Re: SQL Server Agent thro' SP

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

From: Narayana Vyas Kondreddi (answer_me_at_hotmail.com)
Date: 07/01/04


Date: Thu, 1 Jul 2004 10:29:26 +0100

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

  • Re: Unable to Connect to SQL Server 2000
    ... sounds like you are trying to start SQL agent without first starting SQL ... sometimes the SQL Server and the SQL Server Agent ... > manually start it by going through the SQL Server Entreprise Manager. ...
    (microsoft.public.sqlserver.connect)
  • Re: SQL Server Agent Jobs
    ... The SQL Server agent user is a Systems Admininstrator on ... However if I put in systems administrator rights to ...
    (microsoft.public.sqlserver.server)
  • Re: Email notification does not send
    ... SQL Mail and Outlook Express as your SMTP client. ... How to configure SQL Server Agent to send job status notifications and alert ...
    (microsoft.public.sqlserver.clustering)
  • Re: SQL SERVER AGENT NOT STARTING
    ... The SQL Agent runs under the domain admins account. ... starts and stops running but all other SQL services are running. ... i try to start my SQL SERVER AGENT. ...
    (microsoft.public.sqlserver.server)
  • Re: Need Help - Export and Import
    ... You do not need DTS but here is how I would do this ... FTP using ftp.exe the fileto the other server (Same SQL Server Agent ...
    (microsoft.public.sqlserver.dts)