STOP ENGINE statement

Use this statement to stop a database server.

Syntax
STOP ENGINE [ database-server-name ] [ UNCONDITIONALLY ]
Parameters
  • 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 clause   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.

Remarks

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.

Permissions

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.

Side effects

None

See also
Standards and compatibility
  • SQL/2003   Vendor extension.

Example

Stop the current database server, as long as there are no other connections.

STOP ENGINE;