Re: SQL Server Agent thro' SP
From: Narayana Vyas Kondreddi (answer_me_at_hotmail.com)
Date: 07/01/04
- Next message: Marc: "Job failure"
- Previous message: John: "Thanks"
- In reply to: Shweta: "SQL Server Agent thro' SP"
- Next in thread: Shweta: "Re: SQL Server Agent thro' SP"
- Reply: Shweta: "Re: SQL Server Agent thro' SP"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Marc: "Job failure"
- Previous message: John: "Thanks"
- In reply to: Shweta: "SQL Server Agent thro' SP"
- Next in thread: Shweta: "Re: SQL Server Agent thro' SP"
- Reply: Shweta: "Re: SQL Server Agent thro' SP"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|