Disconnecting from a database

To disconnect users from a database see Managing connected users.

To disconnect from a database (Sybase Central)
  1. Select a database.

  2. Choose File » Disconnect.

To disconnect from a database (SQL)

See DISCONNECT statement [ESQL] [Interactive SQL] and DROP CONNECTION statement.

To disconnect other users from a database (SQL)
  1. Connect to the database as a user with DBA authority.

  2. Use the sa_conn_info system procedure to determine the connection ID of the user you want to disconnect.

  3. Execute a DROP CONNECTION statement.

Examples

The following statement shows how to use the DISCONNECT statement to disconnect the current connection, conn1, in Interactive SQL:

DISCONNECT conn1;

The following statement shows how to use DISCONNECT in embedded SQL:

EXEC SQL DISCONNECT :conn-name

The following statement drops connection number 4.

DROP CONNECTION 4;