Today, I just came across a requirement to find Status of SQL Server Agent via TSQL.
Here is it...
EXEC xp_servicecontrol querystate , N'SQLServerAGENT'
More info on http://www.mssqltips.com/sqlservertip/2036/monitor-start-and-stop-sql-server-services-using-xpservicecontrol/.
Happy programming.. :)
Here is it...
EXEC xp_servicecontrol querystate , N'SQLServerAGENT'
More info on http://www.mssqltips.com/sqlservertip/2036/monitor-start-and-stop-sql-server-services-using-xpservicecontrol/.
Happy programming.. :)
No comments:
Post a Comment