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.
| Author |
Topic |
|
morphias0
Starting Member
20 Posts |
Posted - 2006-03-22 : 10:30:31
|
| We run the backup scripts we have with a command similar to osql -E -n -i [script source] -o [log destination]at the cmd prompt. After it completes there is no sign of it in the command prompt and you have to go look at the log file. This is fine for me but my boss wants it to actually display something in the cmd window. Is there a way to display whether it completed with errors or not in the same command window that the script is being run from.Any help is appriciated,Thanks in advanceTodd |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-03-22 : 12:21:48
|
After the OSQL command, add:type [log destination] where [log destination] is the same output file that the OSQL command used.CODO ERGO SUM |
 |
|
|
morphias0
Starting Member
20 Posts |
Posted - 2006-03-22 : 13:15:23
|
| They would like to see whether it failed or if it completed successfully. They dont really want to look at the whole log. I was thinking that I could have it return a 0 if no errors and a 1 if there were one or more errors while running the script.Is that possible? |
 |
|
|
|
|
|