Re: SQL Server Agent thro' SP

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Shweta (Shweta_at_discussions.microsoft.com)
Date: 07/01/04


Date: Thu, 1 Jul 2004 02:49:01 -0700

Thanks a lot, Narayana for your prompt reply.
I saw this XP in Master DB, but could not get any documentation @ it. Actually there are a few more undocumented extended stored procedures realted to Agent. Anyways, your post is a great help to me.

Thanks again,
Shweta

"Narayana Vyas Kondreddi" wrote:

> You can use master.dbo.xp_servicecontrol, to query the state of SQLAgent and
> to start and stop it. For example:
> http://groups.google.com/groups?selm=udhB6NMKAHA.215%40cppssbbsa02.microsoft.com
>
> Note that this is undocumented.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
> Is .NET important for a database professional?
> http://vyaskn.tripod.com/poll.htm
>
>
> "Shweta" <Shweta@discussions.microsoft.com> wrote in message
> news:E50CE3AD-83EA-4B1A-917B-55A12EA61B72@microsoft.com...
> Hi there,
>
> I have a requirement in which I need to check if SQL Server Agent Service is
> running. If it is not running, then I need to start the service using stored
> procedure. Since we have a SQL Server 2000, I can not use SQL-SCM API.
>
> The other option is to use Command line utility - sqlagent. But, it is
> independent of the Windows NT Service Control Manager & BOL says that use
> 'sqlagent' application for SQL Agent diagnosis purpose. So this option is
> also out.
>
> My last option is to use SQL DMO, create a application & use it. But before
> this I would like to know if there is any way to achieve this thro' SQL
> Server 2000 using SPs etc.
>
> Any help in this matter is welcome.
>
> Thanks in advance
> -Shweta
>
>
>
>



Relevant Pages