How to forcefully close a session that is being locked#
Overview#
This is a method of forcibly ending a session that is being locked.
Version#
Altibase version 4 or later
Solution#
It must be performed by accessing the sys account.
-
Check the table name, transaction ID, and lock type in v$lock.
Select a.table_name, b.trans_id, b.lock_desc From system_.sys_tables_ a, v$lock b Where a.table_oid = b.table_oid; -
Use the trans_id obtained above to find the session.
Select session_id, execute_flag, total_time, execute_time, rpad(query,400) From v$statement Where tx_id = 위에서 얻은 trans_id; -
Use the session_id to check the session information.
Select comm_name, client_app_info From v$session Where id = 위에서 얻은 session_id; -
Disconnect the session.
iSQL> Alter database mydb session close session_id; For mydb, open the $ALTIBASE_HOME/conf/altibase.properties file as the database name and check it by setting the DB_NAME item. Enter the Session_id as well as the session_id obtained above.
Reference#
-
A session in which rollback is in progress is not disconnected even if session close is performed, so must wait until the rollback is finished.
-
For information on the above v$ view OR SYSTEM_META_TABLE column, refer to the Admin manual.