Article ID: 125627 - View products that this article applies to.
This article was previously published under Q125627
This article has been archived. It is offered "as is" and will no longer be updated.
The SQL Service Manager provides a way to remotely start and stop SQL Server. However, the SQL Service Manager cannot be used to start and stop SQL Server from a batch file or Windows NT Command Prompt. The AT scheduler from Windows NT, the Remote Command Server, NETSVC service from the Windows NT version 4.0 Resource Kit, and Terminal Server service in Microsoft Windows 2000 allow the ability to start and stop services from the NT Command Prompt, provided that you have privileges to start and stop services on the remote machine.
To Use the NETSVCTo stop SQL Server running on a server named 'MYSQLServer', install the Resource Kit onto the remote computer, and then run NETSVC on the remote computer that is used to control the SQLserver 'MYSQLServer' using the following command:
NETSVC "mssqlserver" \\MYSQLServer /stopFor additional help, type the following:
To Use Terminal ServerIf SQL Server is running on a Windows 2000 computer, install Terminal Server service on the Windows 2000 computer and then install the Terminal Server client on the remote computer. The remote computer can be running either Windows NT 4.0 or Windows 2000.
To Use the AT SchedulerNOTE: This method will not work in a batch file, because you need to know the current time of the remote machine.
AT \\NT35Server 12:02:00pm NET STOP SQLSERVER
Article ID: 125627 - Last Review: February 28, 2014 - Revision: 3.3
Contact us for more help