March 27, 2009 at 4:01 am
Hi everyone
is there anyway i can automate checking whether SQL server agent and the SQL service is running,
but also notifying certain people via email that its down...
thanks
March 27, 2009 at 4:21 am
yisaaacs (3/27/2009)
Hi everyoneis there anyway i can automate checking whether SQL server agent and the SQL service is running,
but also notifying certain people via email that its down...
thanks
You can use this command to see whether your server is running:
EXEC master.dbo.xp_servicecontrol 'QUERYSTATE', 'SQLAgent'
March 27, 2009 at 9:00 am
Krishna (3/27/2009)
yisaaacs (3/27/2009)
Hi everyoneis there anyway i can automate checking whether SQL server agent and the SQL service is running,
but also notifying certain people via email that its down...
thanks
You can use this command to see whether your server is running:
EXEC master.dbo.xp_servicecontrol 'QUERYSTATE', 'SQLAgent'
Nice, did not know that, another tip learned
although it'll be ironic, if MSSQLSERVER is not running, you cannot run the above command to check the service 😛
Here is another SSC's thread to explain more
http://www.sqlservercentral.com/Forums/Topic14726-5-1.aspx
March 27, 2009 at 10:21 am
Jerry Hung (3/27/2009)
Krishna (3/27/2009)
yisaaacs (3/27/2009)
Hi everyoneis there anyway i can automate checking whether SQL server agent and the SQL service is running,
but also notifying certain people via email that its down...
thanks
You can use this command to see whether your server is running:
EXEC master.dbo.xp_servicecontrol 'QUERYSTATE', 'SQLAgent'
Nice, did not know that, another tip learned
although it'll be ironic, if MSSQLSERVER is not running, you cannot run the above command to check the service 😛
Here is another SSC's thread to explain more
oops sorry typo meant to say sql agent:-D
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply