Background
- When operating Oracle, when multiple people operate the same table in the Oracle database at the same time, it often results in a lock table phenomenon that needs to be unlocked manually.
Steps
- Log in to the Oracle database as DBA (otherwise users are missing the kill process privilege and need to assign permissions to the user)
- Sqlplus/as SYSDBA, such as
- To view locked table processes
- Select B.owner,b.object_name,a.session_id,a.locked_mode from V$locked_object a,dba_objects b where b.object_id = a.object_id;
- Find the SID and serial# of the lock table process because SIDS and serial# collectively determine the unique database process session
- Select B.username,b.sid,b.serial#,logon_time from V$locked_object a,v$session b where a.session_id = B.sid ORDER by B.logo N_time;
- Kill the process
- Alter system kill session ' sid,serial# ';
Oracle table lock, kill lock table process