Shuts down the Adaptive Server from which the command is issued, its local Backup Server, or a remote Backup Server.
shutdown [srvname ] [with {wait | nowait}]
is the logical name by which the Backup Server is known in the Adaptive Server sysservers system table. This parameter is not required when shutting down the local Adaptive Server.
is the default. This shuts down the Adaptive Server or Backup Server gracefully.
shuts down the Adaptive Server or Backup Server immediately, without waiting for currently executing statements to finish.
Use of shutdown with nowait can lead to gaps in IDENTITY column values.
Shuts down the Adaptive Server from which the shutdown command is issued:
shutdown
Shuts down the Adaptive Server immediately:
shutdown with nowait
Shuts down the local Backup Server:
shutdown SYB_BACKUP
Shuts down the remote Backup Server REM_BACKUP:
shutdown REM_BACKUP
Unless you use the nowait option, shutdown attempts to bring Adaptive Server down gracefully by:
Disabling logins (except for the System Administrator)
Performing a checkpoint in every database
Waiting for currently executing SQL statements or stored procedures to finish
Shutting down the server without the nowait option minimizes the amount of work that must be done by the automatic recovery process.
Unless you use the nowait option, shutdown backup_server waits for active dumps and loads to complete. Once you issue a shutdown command to a Backup Server, no new dumps or loads that use this Backup Server can start.
Use shutdown with nowait only in extreme circumstances. In Adaptive Server, issue a checkpoint command before executing a shutdown with nowait.
You can halt only the local Adaptive Server with shutdown; you cannot halt a remote Adaptive Server.
You can halt a Backup Server only if:
It is listed in your sysservers table. Use sp_addserver to add entries to sysservers.
It is listed in the interfaces file for the Adaptive Server where you execute the command.
Use sp_helpserver to determine the name by which a Backup Server is known to the Adaptive Server. Specify the Backup Server’s name— not its network_name—as the srvname parameter. For example:
sp_helpserver
name network_name status id ---------- ------------- ------------------------------------ -- REM_BACKUP WHALE_BACKUP timeouts, no net password encryption 3 SYB_BACKUP SLUG_BACKUP timeouts, net password encryption 1 eel eel 0 whale whale timeouts, no net password encryption 2
To shut down the remote Backup Server named WHALE_BACKUP, use:
shutdown REM_BACKUP
ANSI SQL – Compliance level: Transact-SQL extension.
shutdown permission defaults to System Administrators and is not transferable.
Values in event and extrainfo columns of sysaudits are:
Event |
Audit option |
Command or access audited |
Information in extrainfo |
---|---|---|---|
51 |
security |
Server shutdown |
|
Commands alter database
System procedures sp_addserver, sp_helpserver
Copyright © 2005. Sybase Inc. All rights reserved. |