dbTalk Databases Forums  

Turning off a Service using DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Turning off a Service using DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris
 
Posts: n/a

Default Turning off a Service using DTS - 11-11-2006 , 01:43 PM






I have a dilema I cannot figure out.

I need to run a step in a DTS package that checks a count in a table. If the
count does not meet my criteria I need it to error out and run a batch file
to turn off a service on a different server.

I have tried running another DTS package (shelling out a cmd) on the server
where the service lives. I can get the the package to run but it will not
turn off the service.

I have also tried to run the batch file (shelling out a cmd) to turn the
service off as well. The batch file lives on the server where the service
needs to be turn off but it will not turn it off.

If I run the DTS package that I am shelling outm on the server where the
service lives it works fine.

Can any one give any insight into this?

Thanks for all of your help

Reply With Quote
  #2  
Old   
Dave Patrick
 
Posts: n/a

Default Re: Turning off a Service using DTS - 11-11-2006 , 03:19 PM






You might try sc.exe with a fully qualified path.

sc.exe \\servername stop "service name"

also try;
http://www.microsoft.com/technet/sys...PsService.mspx


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Chris" wrote:
Quote:
I have a dilema I cannot figure out.

I need to run a step in a DTS package that checks a count in a table. If
the
count does not meet my criteria I need it to error out and run a batch
file
to turn off a service on a different server.

I have tried running another DTS package (shelling out a cmd) on the
server
where the service lives. I can get the the package to run but it will not
turn off the service.

I have also tried to run the batch file (shelling out a cmd) to turn the
service off as well. The batch file lives on the server where the service
needs to be turn off but it will not turn it off.

If I run the DTS package that I am shelling outm on the server where the
service lives it works fine.

Can any one give any insight into this?

Thanks for all of your help



Reply With Quote
  #3  
Old   
Chris
 
Posts: n/a

Default Re: Turning off a Service using DTS - 11-11-2006 , 06:09 PM



Cool, thanks. I think this is exactly what I am looking for.



"Dave Patrick" wrote:

Quote:
You might try sc.exe with a fully qualified path.

sc.exe \\servername stop "service name"

also try;
http://www.microsoft.com/technet/sys...PsService.mspx


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Chris" wrote:
|I have a dilema I cannot figure out.
|
| I need to run a step in a DTS package that checks a count in a table. If
the
| count does not meet my criteria I need it to error out and run a batch
file
| to turn off a service on a different server.
|
| I have tried running another DTS package (shelling out a cmd) on the
server
| where the service lives. I can get the the package to run but it will not
| turn off the service.
|
| I have also tried to run the batch file (shelling out a cmd) to turn the
| service off as well. The batch file lives on the server where the service
| needs to be turn off but it will not turn it off.
|
| If I run the DTS package that I am shelling outm on the server where the
| service lives it works fine.
|
| Can any one give any insight into this?
|
| Thanks for all of your help




Reply With Quote
  #4  
Old   
Dave Patrick
 
Posts: n/a

Default Re: Turning off a Service using DTS - 11-11-2006 , 06:13 PM



Good to hear. You're welcome.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Chris" wrote:
Quote:
Cool, thanks. I think this is exactly what I am looking for.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.