Showing posts with label replicated. Show all posts
Showing posts with label replicated. Show all posts

Saturday, February 25, 2012

Agent Query

Is there any way to query whether the SQL Agent is running i.e. from within a
scripted query. I support about 30 msde replicated databases running on
different servers across a wan and often the damn sql agent does not start up
after a reboot. I want to write a sql script that will query whether the
Agent is running, without having to use the Enterprise Manager interface.
hi,
"Surfgate" <Surfgate@.discussions.microsoft.com> ha scritto nel messaggio
news:D3799708-5CFD-4E9D-8D3E-049160E65AD8@.microsoft.com...
> Is there any way to query whether the SQL Agent is running i.e. from
within a
> scripted query. I support about 30 msde replicated databases running on
> different servers across a wan and often the damn sql agent does not start
up
> after a reboot. I want to write a sql script that will query whether the
> Agent is running, without having to use the Enterprise Manager interface.
actually it's not an activity I know how to do with Transact-SQL... but you
can perhaps use SQL-DMO in a vbs file querying the
SQLServerObject.JobServer.Status for a 1 value (SQLDMOSvc_Running), but this
requires an extra SQL-DMO connection to all servers...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply