BUG: Scm.exe command line arguments not documented in SQL 7.0 Books Online (230236)



The information in this article applies to:

  • Microsoft SQL Server 7.0
  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q230236
BUG #: 55442 (SQLBUG_70)

SYMPTOMS

The Service Control Manager (SCM) can be used to stop, start, and pause any service in Microsoft Windows NT, using the command line syntax. Under Win9x, the utility can be used to control SQL Server-related MSSQLServer, SQLServerAgent, and Microsoft Distributed Transaction Coordinator (MSDTC). SCM.exe can be executed from command line with the following arguments:
Service Control Manager Utility Command Line Arguments
=======================================================
-Action
1 = Start, 2 = Restart,
3 = IsRunning (returns exit code of 1056 if an instance of the service is already running.,1062 if the service has not been started.)
4 = Delete Service, 5 = Install Service,
6 = Stop, 7 = Modify

-Server        <Optional name of the SQL server (default is this computer)>
-Pwd           <Optional SQL server 'sa' password (default is "")>
-StartupOptions <Optional space-delimited list of server startup options>
-Service       <Name of the service (default is MSSQLServer)>
-ExePath       <Path to the service exe on this computer>
-SvcStartType  <1 for SERVICE_DEMAND_START or 2 for SERVICE_AUTO_START>
-SvcAccount    <service account name>
-SvcPwd        <service account name password>
-Dependencies  <List of service name dependencies separated by semi-colons>
-Silent        <1 to suppress most messages or 0 for interactive mode>
				
To start the SQL Server service, use:
scm -Action 1 -Server jtknt0 -Service MSSQLServer
				
To stop the Microsoft Search service, use:
scm -Action 6 -Server jtknt0 -Service mssearch
				
Use the options listed in the "Symptoms" section for executing Scm.exe from a command prompt or a batch program.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For additional information about starting MSSQLServer on Windows 95 or Windows 98, see the following article in the Microsoft Knowledge Base:

196654 How to control the SQL Server services on Windows 95 or Windows 98


Modification Type:MajorLast Reviewed:6/28/2004
Keywords:kbBug kbpending KB230236