Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - SQL Reference » SQL statements » Alphabetical list of SQL statements

STOP DATABASE statement

Stops a database on the current database server.

Syntax
STOP DATABASE database-name
[ ON database-server-name ]
[ UNCONDITIONALLY ]
Parameters
  • STOP DATABASE clause

    The database-name is the name of a database (other than the current database) running on the current server.

  • ON clause

    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.

  • UNCONDITIONALLY clause

    Stop the database even if there are connections to the database. By default, the database is not stopped if there are connections to it.

Remarks

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.

Privileges

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.

Side effects

None

Standards
  • ANSI/ISO SQL Standard

    Not in the standard.

Example

Stop the database named sample on the current server.

STOP DATABASE sample;