shutdown

Description

Shuts down the Adaptive Server from which the command is issued, its local Backup Server, or a remote Backup Server. This command can be issued only by a System Administrator.

Syntax

shutdown [srvname ] [with {wait | nowait}]

Parameters

srvname

is the logical name by which the Backup Server is known in the Adaptive Server’s sysservers system table. This parameter is not required when shutting down the local Adaptive Server.

with wait

is the default. This shuts down the Adaptive Server or Backup Server gracefully.

with nowait

shuts down the Adaptive Server or Backup Server immediately, without waiting for currently executing statements to finish.

NoteUse of shutdown with nowait can lead to gaps in IDENTITY column values.

Examples

Example 1

Shuts down the Adaptive Server from which the shutdown command is issued:

shutdown

Example 2

Shuts down the Adaptive Server immediately:

shutdown with nowait

Example 3

Shuts down the local Backup Server:

shutdown SYB_BACKUP

Example 4

Shuts down the remote Backup Server REM_BACKUP:

shutdown REM_BACKUP

Usage

Standards

SQL92 – Compliance level: Transact-SQL extension.

Permissions

shutdown permission defaults to System Administrators and is not transferable.

See also

Commands alter database

System procedures sp_addserver, sp_helpserver