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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTS to start and stop a service?

Author  Topic 

pithhelmet
Posting Yak Master

183 Posts

Posted - 2004-06-24 : 12:39:27

Hi Everyone -

I have created a windows service that runs fine,

but now i need to have SQL server start the service
whenever a DTS job runs and a record is found...

how can i accomplish this task (starting a service
from within a DTS job)??

thanks
tony


tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-06-24 : 12:42:42
You could do this within an Execute SQL Task using xp_cmdshell along with NET START and NET STOP. Or you could do this in an ActiveX task through VBScript code or Execute Process task by launching an executable or batch file (I'd suggest the batch file over an executable).

Tara
Go to Top of Page
   

- Advertisement -