Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 script for sql server agent

Author  Topic 

vaddi
Posting Yak Master

145 Posts

Posted - 2006-08-08 : 11:47:54
Hello

Can anyone let me know the script to check whether the sql server agent is running or not.

Thanks

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-08-08 : 12:17:11
[code]
-- In SQL 2000
if exists(
select *
from master.dbo.sysprocesses
where program_name like 'SQLAgent - %')
begin
print 'SQL Agent running'
end
else
begin
print 'SQL Agent NOT running'
end

[/code]

CODO ERGO SUM
Go to Top of Page
   

- Advertisement -