March 11, 2004 at 9:28 am
MSSQL2K / SP3 ... Is there a way in TSQL to check to see if the SQL Server Agent is running? I need to check this for scripts that apply changes to replication, etc.
March 11, 2004 at 10:51 am
master..xp_servicecontrol 'querystate', 'SQLSERVERAGENT'
March 11, 2004 at 11:17 am
thanks stacenic .. this is just what I am looking for .. now, I know there is a way to start the SQL Server Agent from a command line, but is there also a way to start it from within TSQL? .. (without using xp_cmdshell)
March 11, 2004 at 11:42 am
master..xp_servicecontrol 'START', 'SQLSERVERAGENT' --starts
master..xp_servicecontrol 'STOP', 'SQLSERVERAGENT' -- stops
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply