dbTalk Databases Forums  

osql question

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss osql question in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Randy
 
Posts: n/a

Default osql question - 06-14-2004 , 03:14 PM






Re:

osql -i test.sql -e -b -r 1 > temp.log

I intend to use osql to submit a bunch of SQL scripts from
a batch file.

If the SQL script has an error, the message is logged with
a line number. But the echoed input does not have line
numbers. Instead, the SQL text is preceded by a line that
looks like:

1> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17>
18> 19> 20> 21> 22> 23>

The above looks to me like the line numbers without the
text. The text is successfully echoed after that, but
with out line numbers.

Is there any way to get the text echoed to the log file
with line numbers?




Reply With Quote
  #2  
Old   
John Bell
 
Posts: n/a

Default Re: osql question - 06-14-2004 , 03:55 PM






Hi

I don't think you can do exactly what you want. -n will turn of the N>
prompts and -m can set the error level to display.

John

"Randy" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Re:

osql -i test.sql -e -b -r 1 > temp.log

I intend to use osql to submit a bunch of SQL scripts from
a batch file.

If the SQL script has an error, the message is logged with
a line number. But the echoed input does not have line
numbers. Instead, the SQL text is preceded by a line that
looks like:

1> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17
18> 19> 20> 21> 22> 23

The above looks to me like the line numbers without the
text. The text is successfully echoed after that, but
with out line numbers.

Is there any way to get the text echoed to the log file
with line numbers?






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.