August 17, 2010 at 1:05 pm
I have written a light weight server monitor that touches each of my servers every morning and checks our backup status, database status etc. I am trying to add a few new features to it including determining if the SQL Server Agent is up and running at the time of the test. I'm using SSIS to make the connections.
Does anyone know T-SQL command that I can use (or SSIS feature) to determine if the Agent is running?
Thanks
Kenneth
Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]
August 17, 2010 at 1:20 pm
you can use xp_servicecontrol, you can punt the output to a table and then figure if the service is running, you should be able to find a script on here detailing its use.
Andrew
August 17, 2010 at 1:24 pm
andrewkane17 (8/17/2010)
you can use xp_servicecontrol, you can punt the output to a table and then figure if the service is running, you should be able to find a script on here detailing its use.Andrew
exec master.dbo.xp_servicecontrol 'QUERYSTATE', 'SQLServerAgent'
_________________________________
seth delconte
http://sqlkeys.com
August 17, 2010 at 1:33 pm
Thanks guys. I love finding out about those fun little xp/sps 🙂
Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply