![]() |
|
|
By: Jugal Shah | Read Comments (2) | Print Jugal has 8+ years of extensive SQL Server experience and has worked on SQL Server 2000, 2005, 2008 and 2008 R2. Related Tips: More |
|
Sometimes SQL Server services or any other Windows service does not start due to some issue after a server reboot. When you try to login to the server you find that you do not have remote login rights to that server or remote login is disabled for that server. Here is a solution to start the service remotely. This tip is also useful if you want to start a number of services in a particular order.
To control the services remotely, we can use either the services.msc GUI or the SC (Service Control) command to start, query, stop, create and delete any Windows service remotely. The SC command is very useful when remote login is disabled and we want to start the service.
You can set permissions for individual services by using Security Templates or using Security Policy.
The first option is to use the Services application to control the services on a remote server. Type services.msc in the run window or go to Control Panel -> Administrative Tools -> Services. When this app opens, click on the Action menu and click on "Connect to another computer...".

Enter the remote computer name as shown below and it will load the services of the remote machine. Once you connect you can manage the services as your normally do.

The other option is to use the command line tool SC.exe.
SC [\\server] [command] [service name] [Options]
To get a list of options you can run sc /? as shown below. The below image lists the commands you can use with SC.

This command will start the SQL Server service on server "\\computer100".
sc \\computer100 START "mssqlserver"

This command will stop the SQL Server service on server "\\computer100".
sc \\computer100 STOP "mssqlserver"

| Share: | Share | Tweet |
|
![]() |
![]() |
Free SQL Server Learning |
| Wednesday, September 08, 2010 - 12:05:11 PM - Gennadiy Chornenkyy | Read The Tip |
|
Very helpful - thanks! |
|
| Wednesday, February 15, 2012 - 4:40:25 AM - sumi | Read The Tip |
| hi, while connecting remote machine using the above commend i'm getting OpenSCManger failed. Access denied. Thanks, Sumi | |
|
privacy | disclaimer | copyright | advertise | about authors | contribute | feedback | giveaways | user groups Some names and products listed are the registered trademarks of their respective owners. Edgewood Solutions LLC | MSSharePointTips.com | MSSQLTips.com |