Stops a database on the current database server.
STOP DATABASE database-name [ ON database-server-name ] [ UNCONDITIONALLY ]
The database-name is the name of a database (other than the current database) running on the current server.
This clause is supported in Interactive SQL only. If database-server-name is not specified in Interactive SQL, all running servers are searched for a database of the specified name.
When not using this statement in Interactive SQL, the database is stopped only if it is started on the current database server.
Stop the database even if there are connections to the database. By default, the database is not stopped if there are connections to it.
The STOP DATABASE statement stops a specified database on the current database server.
You cannot use STOP DATABASE on the database to which you are currently connected.
If you want the database server to ignore certain connections when determining whether or not to shut down the database, then you can use the connection_type option.
The required privileges to stop a database on the network server are determined by the database server -gd option. The default system privilege for stopping a database on the network server is SERVER OPERATOR.
None
Not in the standard.
Stop the database named sample on the current server.
STOP DATABASE sample;