Monday, March 19, 2012

How to find sql server agent running using tsql

How to find using TSQL or some sql server function that SQL Server agent
is running or stopped.
--
Thanks
Amish
SQL Server DBA
ExtraQuest"AM" <anonymous@.developersdex.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
Perhaps something like:
SELECT program_name
FROM sysprocesses
WHERE program_name like 'SQLAgent%'
I think that you should get at least one row back if it is running.
Rick Sawtell
MCT, MCSD, MCDBA|||See if this helps:
Code Makes Sure the SQL Agent Service Is Running
http://www.windowsitpro.com/Article/ArticleID/46083/46083.html
AMB
"AM" wrote:
> How to find using TSQL or some sql server function that SQL Server agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>
>|||fn_agentservice_DMO()
http://www.sqldbatips.com/displaycode.asp?ID=36
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"AM" <anonymous@.developersdex.com> wrote in message
news:O7lq85TkFHA.3144@.TK2MSFTNGP12.phx.gbl...
> How to find using TSQL or some sql server function that SQL Server
> agent
> is running or stopped.
> --
> Thanks
> Amish
> SQL Server DBA
> ExtraQuest
>

No comments:

Post a Comment