scm Utility

Command Prompt Utilities

Command Prompt Utilities

scm Utility

The scm utility (the Service Control Manager) creates, modifies, starts, stops, or pauses any of the Microsoft® SQL Server™ 2000 services that run under Microsoft Windows NT® and Microsoft Windows® 2000. Under Microsoft Windows 98, the scm utility starts, stops, or pauses the equivalent SQL Server applications.

Syntax

scm [-?]
    -Action {1 | 2 | 3 | 4 | 5 | 6 | 7}
    -Service service_name
    [-Server server_name]
    [-Pwd sa_password]
    [-StartupOptions startup_option [ ...n] ]
    [-ExePath exe_file_path]
    [-SvcStartType {1 | 2}]
    [-SvcAccount service_account]
    [-SvcPwd service_password]
    [-Dependencies service_name_dependency [;...n] ]

Arguments

[-?]

Displays usage information.

-Action {1 | 2 | 3 | 4 | 5 | 6 | 7}

Specifies which of these actions the utility performs.

Code Action
1 Start
2 Restart
3 Is Running
4 Delete Service
5 Install Service
6 Stop
7 Modify

The scm utility returns a message box indicating if the action succeeded or failed. When using the 3 action code, success indicates the service is running and failure indicates the service is not running.

-Service service_name

Specifies which SQL Server 2000 service is affected.

[-Server server_name]

Specifies the server for which a service is affected. The default is the local computer.

Note  Do not include an instance name with the server_name. Only use the computer name. To affect a named instance, specify the unique service_name with the -Service option.

[-Pwd sa_password]

Is the sa login password on the server. The default is a blank password.

[-StartupOptions startup_option [ ...n] ]

Specifies a space-delimited list of server startup options to be used when the service starts. This option is applicable when you install or modify the service.

[-ExePath exe_file_path]

Specifies the file path to the service executable on the local computer. This option is applicable when you install or modify the service.

[-SvcStartType {1 | 2}]

Specifies whether the service starts automatically. If 1 is specified, the service must be started manually. If 2 is specified, the service starts automatically when the computer starts. This option is applicable when you install or modify the service.

[-SvcAccount service_account]

Specifies the network login account to assign to the service. This option is applicable when you install or modify the service.

[-SvcPwd service_password]

Specifies the network login account password. This option is applicable when you install or modify the service.

[-Dependencies service_name_dependency [;...n] ]

Specifies dependencies that this service has on other services. A dependent service can run only if the parent service is running. This option is applicable when you install or modify the service.

Remarks

For information about where to find or how to run this utility, see Getting Started with Command Prompt Utilities.