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 |
jbates99
Constraint Violating Yak Guru
396 Posts |
Posted - 2012-03-21 : 15:12:41
|
Hi everyone,I want to bounce services on a non=SQl Server server - bu using an Agent Job I found this extended system procedure (undocumented). it works perfectly for manipulating services on the local machine.Exec xp_servicecontrol N'stop', N'RVWRouter';Has anyone found a way of starting/stopping services on a remote server?Thanks for any ideas. John |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2012-03-21 : 15:19:38
|
You can use sc for this |
 |
|
jbates99
Constraint Violating Yak Guru
396 Posts |
Posted - 2012-03-22 : 09:49:29
|
Thanks for your ideas visakh16 and Russell.This is what I need to do:From Server 1 (SQL Server 2005) - an Agent Job will- stop & start 3 services on Server 2- run iisreset on Server 3I think Services Controller might be good.But I still need a way of running iisreset on my remote Web Server from my Agent jobThanks, John |
 |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2012-03-22 : 12:04:14
|
How remote? Different domain? |
 |
|
jbates99
Constraint Violating Yak Guru
396 Posts |
Posted - 2012-03-22 : 17:07:07
|
Just need to bounce IIS on another server but within the same domain.Windows Server 2003 |
 |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2012-03-22 : 20:08:27
|
SC is your ticket then. As long as the account executing it (your SQL Agent Account) is admin on the remote box. |
 |
|
|
|
|