Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Understanding what /w500, /n, /e, /d, and -s mean

Author  Topic 

cirugio
Yak Posting Veteran

90 Posts

Posted - 2010-05-20 : 11:09:01
I just inherited some Transact code which appears to be executed through osql. I am trying to figure out what it all means. Below is a small portion of it, would someone be able to help me determine what the /w500, /n, /e, /d, and -s mean in the logic below?

Also, it appears the output is stored into the \SourceData\ExceptionsReports\ folder on some drive. How do I determine what drive its under?

if Right(@RptName, 3) = 'CSV'
Select @Cmd = **'osql /w500 /n /E /dQRM_TDM_DATA' +
' /qdbo.[' + @RPTName + '] >\\' + @@SERVERNAME +
'\SourceData\ExceptionReports\' + @FileName + ' -s ",""'
else**

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2010-05-20 : 11:40:43
/w, /n /e etc. are the optional arguments to OSQL utility and you can find out what they mean by looking at sql server help.

Secondly, \\servername\SourceData\ExceptionsReports\ looks to be some kind of shared drive. If you have access to that server, you can goto it's computer maangement console and check shares option to see which drive this share points to.

Harsh Athalye
http://www.letsgeek.net/
Go to Top of Page

cirugio
Yak Posting Veteran

90 Posts

Posted - 2010-05-20 : 12:02:24
Sorry for these basic questions, but I very new to SQL. Per your suggestion, I took a look under the SQL Enterprise Manager's under:
.Console Root
.Management
.SQL Server Agent
. Alerts . Operator .Jobs

But don't see exactly where to check for the shares option to determine which drive this share points to. Any additional guidance is appreaciated.

This procedure I inherted was stored on another server, I just need to copy the logic to make it work on a different server all together.
Go to Top of Page

cirugio
Yak Posting Veteran

90 Posts

Posted - 2010-05-20 : 13:34:39
I was able to resolve the issue. Thanks for all the help.
Go to Top of Page
   

- Advertisement -