SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


sqlcmd output


sqlcmd output

Author
Message
teresa.brandon
teresa.brandon
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 38
I'm new to sqlcmd and I created a batch file to process a folder of .sql files. I want to set the output up so that it only outputs to a log file and only if there is an error.

In addition, it would be nice to have a log file that would provide a way to track processing time but this is not a must have. Here is my current batch file:

For %%f IN (C:\TestScripts\*.sql) DO SQLCMD -E -S abczwq3d1 -d Test_20080901 -x -i "%%f" -b -o "%f.txt" & If errorlevel 1 GOTO end
:END

Any ideas on how to change this to provide only error log files only?


Thanks!
Teresa
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search