Link to home
Start Free TrialLog in
Avatar of pgirardier
pgirardier

asked on

How can I start windows service with SQL SERVER ?

Hi

How can I start a  windows service with SQL SERVER. ? I used this command;

exec master..xp_cmdshell 'NET START SERVICE_NAME' but the service still inactive.

How shall I do please ?

Avatar of Aneesh
Aneesh
Flag of Canada image

check the eventviewver for any errors ? also are you able to rightclick and start the service ?
Avatar of pgirardier
pgirardier

ASKER

Yes I'am able to rightclick and start and stop the service.

There is no errors when running  exec master..xp_cmdshell 'NET START SERVICE_NAME'

This is the output:

- System error 5 has occurred.
- NULL
- Access denied.
- NULL
- NULL

 
ASKER CERTIFIED SOLUTION
Avatar of GKalosky
GKalosky

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial