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

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » SQL Anywhere database connections » Database connections » Managing connected users

 

Disconnecting from a database (SQL)

Disconnect from a database by using the DISCONNECT statement or other users by using the DROP CONNECTION statement.

Prérequis

You do not need any privileges to disconnect from the database.

You must have the DROP CONNECTION system privilege to disconnect other users.

 Task
  • Connect to the database.

    Option Action
    Disconnect the current user

    Execute a DISCONNECT statement.

    Disconnect another user

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

    Execute a DROP CONNECTION statement.

Résultat

The user is disconnected from the database.

Exemple

The following statement disconnects 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;

 See also