STOP DATABASE Statement [Interactive SQL]

Stops a database on the specified database server.

Syntax

STOP DATABASE database-name
… [ ON engine-name ]
… [ UNCONDITIONALLY ]

Examples

Usage

If engine-name is not specified, all running engines are searched for a database of the specified name.

The database-name is the name specified in the -n parameter when the database is started, or specified in the DBN (DatabaseName) connection parameter. This name is typically the file name of the database file that holds the catalog store, without the .db extension, but can be any user-defined name.

If UNCONDITIONALLY is supplied, the database is stopped, even if there are connections to the database. If UNCONDITIONALLY is not specified, the database is not stopped if there are connections to it.

Standards

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Not applicable.

Permissions

Requires the SERVER OPERATOR system privilege.

Related reference
DISCONNECT Statement [Interactive SQL]
START DATABASE Statement [Interactive SQL]