BUG: SCM.EXE Command Line Arguments Not Documented in SQL 7.0 Books Online

ID: Q230236


The information in this article applies to:
  • Microsoft SQL Server version 7.0

BUG #: 55442 (SQLBUG_70)

SYMPTOMS

The Service Control Manger 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 a number of arguments.

Following are the command line arguments for the Service Control Manager (SCM.EXE):


Service Control Manager Utility Command Line Arguments
=======================================================
-Action
1 = Start, 2 = Restart,
3 = IsRunning (returns exit code of -1 if FALSE, 1 if TRUE)
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 "")>
-StartuOptions <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> 

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 this to be a problem in SQL Server version 7.0.


MORE INFORMATION

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

Q196654 INF: How to Control the SQL Server Services on Windows 95/98

Additional query words:

Keywords : kbSQLServ700bug
Version : winnt:7.0
Platform : winnt
Issue type : kbbug


Last Reviewed: January 3, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.