Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Start an NT Service From SQL Server 7.0? 1

Status
Not open for further replies.

kateyez44

Programmer
Mar 22, 2002
5
US
Hello. I have been asked to do some research on how to start an NT Service from SQL Server 7.0, if it is possible. Our application has a set of parameters stored in the DB that may be updated by users. When these parameters are updated in the DB, we need to be able to call an NT Service from SQL Server. Is there anyway to do this? I have done some looking (I am not the SQL Server developer), but have not found any information pertaining to this. Any help, or even just a push in the right direction would be greatly appreciated.

Thanks,
Crystal
 
In a stored procedure or trigger, use the xp_cmdshell to start the service.

Example:

xp_cmdshell 'net start myservicename', NO_OUTPUT

If the service name has embedded spaces, you may need to surround the service name with double quotes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top