Tuesday 15 May 2007

Starting/Stoping SQL Server service on remote machine

sc [ServerName] Command ServiceName [ServiceArguments]

ServerName
Specifies the name of the server where the service will be started or stopped. Enter the ServerName in UNC format .
ServerName is not needed if you are stopping/starting a local service.

Command
The command is either “start” or “stop”.

ServiceName
The service name to be started or stopped.

ServiceArguments
Specifies service arguments to pass to the service being started.

Note: this option is not used when the command “stop” is issued.
For more information see http://www.databasejournal.com/features/mssql/article.php/3644906

No comments: