Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sqlcmd output Expand / Collapse
Author
Message
Posted Saturday, August 2, 2008 12:13 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, May 3, 2011 4:54 PM
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
Post #545685
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse