Check services at startup of SQL Server

Posted by SQL DBA on Stack Overflow See other posts from Stack Overflow or by SQL DBA
Published on 2010-05-24T16:02:41Z Indexed on 2010/05/24 16:21 UTC
Read the original article Hit count: 199

Filed under:
|

I am trying to check the state of services when SQL Server is started. I am using xp_cmdshell and 'sc query SQLServerAgent | FIND "STATE"' for example to load the output to a global temp table. It works when SQL Server has already started but does not work when the proc is set to autoexec, via sp_procoption.

© Stack Overflow or respective owner

Related posts about sql

Related posts about xp-cmdshell