ASA SQL User's Guide
Working with Database Objects
Working with databases
When you are finished working with a database, you can disconnect from it. Adaptive Server Anywhere also gives you the ability to disconnect other users from a given database; for more information about doing this in Sybase Central, see Managing connected users.
You can obtain a user's connection-id using the connection_property function to request the connection number. The following statement returns the connection ID of the current connection:
SELECT connection_property( 'number' )
To disconnect from a database (Sybase Central)
Select a database.
Choose Tools
To disconnect from a database (SQL)
Execute a DISCONNECT statement.
The following statement shows how to use DISCONNECT from Interactive SQL to disconnect all connections:
DISCONNECT ALL
The following statement shows how to use DISCONNECT in Embedded SQL:
EXEC SQL DISCONNECT :conn_name
To disconnect other users from a database (SQL)
Connect to an existing database with DBA authority.
Execute a DROP CONNECTION statement.
The following statement drops the connection with ID number 4.
DROP CONNECTION 4
For more information, see DISCONNECT statement [ESQL] [Interactive SQL], and DROP CONNECTION statement.