STOP DATABASE statement [DBISQL]

Description

Stops a database on the specified database server.

Syntax

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

Examples

Example 1

Stop the database named “sample” on the default server:

STOP DATABASE sample

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 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.


Side effects

None

Standards

Permissions

Must have DBA authority.

See also

DISCONNECT statement [DBISQL]

START DATABASE statement [DBISQL]