Use this statement to stop a database server.
STOP ENGINE [ database-server-name ] [ UNCONDITIONALLY ]
STOP ENGINE clause The database-server-name can be used in Interactive SQL only. If you are not running this statement in Interactive SQL, the current database server is stopped.
UNCONDITIONALLY keyword If you are the only connection to the database server, you do not need to use UNCONDITIONALLY. If there are other connections, the database server stops only if you use the UNCONDITIONALLY keyword.
The STOP ENGINE statement stops the specified database server. If the UNCONDITIONALLY keyword is supplied, the database server is stopped even if there are other connections to the database server. By default, the database server will not be stopped if there are other connections to it.
The STOP ENGINE statement cannot be used in stored procedures, triggers, events, or batches.
The permissions to shut down a server depend on the -gk setting on the database server command line. The default setting is all for the personal server, and DBA for the network server.
SQL/2003 Vendor extension.
Stop the current database server, as long as there are no other connections.