Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rikleo2001
Posting Yak Master
185 Posts |
Posted - 2009-02-24 : 04:58:06
|
GuysI want to check if SQL server agent is running or not every 30 minutes, for that I schedule windows job using OSQL executing my qry file which basically query status of sql server agent.sc \\ac010202 query sqlserveragentI get this input into table and process it as per my requirements, this works fine for default instance.Now I have multiple instances on server, when I use same query like belowsc \\ac010202\Instance1 query sqlserveragentI get error OpenSCmanager failed 1722: the RPC server is unavailableAny ideas how to resolve this issue?Many ThanksSKR |
|
ahmad.osama
Posting Yak Master
183 Posts |
Posted - 2009-02-24 : 06:17:17
|
quote: Originally posted by rikleo2001 GuysI want to check if SQL server agent is running or not every 30 minutes, for that I schedule windows job using OSQL executing my qry file which basically query status of sql server agent.sc \\ac010202 query sqlserveragentI get this input into table and process it as per my requirements, this works fine for default instance.Now I have multiple instances on server, when I use same query like belowsc \\ac010202\Instance1 query sqlserveragentI get error OpenSCmanager failed 1722: the RPC server is unavailableAny ideas how to resolve this issue?Many ThanksSKR
Try enabeling file and printer sharing as described in the below KB[url]http://support.microsoft.com/kb/323790 [/url]Regards,Ahmad Osama |
 |
|
rikleo2001
Posting Yak Master
185 Posts |
Posted - 2009-02-24 : 06:42:50
|
It is already enabled, that's why I got it working for default instance. ThanksSKR |
 |
|
rikleo2001
Posting Yak Master
185 Posts |
Posted - 2009-02-24 : 06:43:42
|
But still trying to figure out a work around for named instance? any more help?ThanksSKR |
 |
|
rikleo2001
Posting Yak Master
185 Posts |
Posted - 2009-02-24 : 07:00:19
|
Got it working.Sc \\Servername query SQLAGENT$Instancename(actual windows service name for that instance) and that workedThanks for your helpSKR |
 |
|
|
|
|