Shuts down the SAP ASE server from which the command is issued, its local Backup Server, or a remote Backup Server.
shutdown [srvname] [with {wait [="hh:mm:ss"] | nowait}]]
shutdown {cluster | [instance_name]} [with {wait | nowait}]
shutdown
shutdown with nowait
shutdown SYB_BACKUP
shutdown REM_BACKUP
shutdown cluster
shutdown ase1
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.
A graceful shutdown waits for the currently executing statement to complete, under the assumption that many statements are be atomic transactions that commit on completion. However, a graceful shutdown does not wait for a longer transaction to commit if the session would go into “awaiting command” state within a transaction. Instead, shutdown commences and the transaction rolls back on recovery.
You should check the master..syslogshold table for any long-running open transaction and deal with it before you issue a shutdown. You may deal with such transactions by contacting the users running them to see they can commit the transactions, or kill them and wait for a rollback. Rolling back an active transaction is faster before a shutdown rather than after recovery, as many pages may still be in cache, and there is less scanning of the log involved. If there are multiple long-running transaction, check syslogshold repeatedly until you see no very old transactions.
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.
You can halt only the local SAP ASE server with shutdown; you cannot halt a remote SAP ASE server.
It is listed in your sysservers table. Use sp_addserver to add entries to sysservers.
It is listed in the interfaces file for the SAP ASE server where you execute the command.
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
shutdown REM_BACKUP
shutdown go
See also sp_addserver, sp_helpserver in Reference Manual: Procedures.
ANSI SQL – Compliance level: Transact-SQL extension.
The permission checks for shutdown differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled:
|
Disabled | With granular permissions disabled, you must be a user with sa_role. |
Values in event and extrainfo columns of sysaudits are:
Information | Values |
---|---|
Event | 51 |
Audit option | security |
Command or access audited | Server shutdown |
Information in extrainfo |
|