Use this statement to drop a user's connection to the database.
DROP CONNECTION connection-id
The DROP CONNECTION statement disconnects a user from the database by dropping the connection to the database.
The connection-id parameter is an integer constant. You can obtain the connection-id using the sa_conn_info system procedure.
This statement is not supported in procedures, triggers, events, or batches.
Must have DBA authority.
SQL/2003 Vendor extension.
The following procedure drops a connection identified by its connection number. Note that when executing the DROP CONNECTION statement from within a procedure, you should do so using the EXECUTE IMMEDIATE statement, as shown in this example:
CREATE PROCEDURE drop_connection_by_id( IN conn_number INTEGER ) BEGIN EXECUTE IMMEDIATE 'DROP CONNECTION ' || conn_number; END;
The following statement drops the connection with ID number 4.
DROP CONNECTION 4;
|Envoyer votre avis sur cette page par email.||Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|