Is there any possible way to use T-sql checking sql agent status?
thanx for your repliesHi
Assuming that you require to know that the SQLSERVERAGENT process is
running!You could try something like:
CREATE TABLE Running ( Service varchar(100) )
INSERT INTO Running ( Service ) EXEC master..xp_cmdshell 'NET START'
IF EXISTS ( SELECT 1 FROM Running WHERE Service LIKE '%SQLSERVERAGENT' )
PRINT 'Agent is running'
John
"I.O" <anonymous@.discussions.microsoft.com> wrote in message
news:1EB89D23-BE37-4F3A-98D0-8DACB1874090@.microsoft.com...
> Is there any possible way to use T-sql checking sql agent status?
> thanx for your replies
No comments:
Post a Comment