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 |
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2013-12-07 : 22:17:37
|
I have a bat file, which I run the statement sqlcmd -S Sqlservername -E -Q "select STATUS from MYDATABASE.DBO.CONTROLLOG" -o d:\scripts\testoutput1.txt -eOnce captured the output if the status is COMPLETE, then I can restart some application services.How do I capture the status in a variable so I can do----The start part works, I have this in a bat file tooIF @STATUS = 'COMPLETE' SC \\SERVER START "MY APPLICATION"END |
|
|
|
|