Oracle table lock processing method recently encountered such a problem, operate a table, found that the person is locked, so the query who locked the table, found that many people are locked, security, not all kill, use the following statement to determine who is locked and who is waiting. Www.2cto.com SELECT/* + rule */lpad ('', decode (l. xidusn, 0, 3, 0) | l. oracle_username User_name, o. owner, o. object_name, o. object_type, s. sid, s. serial # FROM v $ locked_object l, dba_objects o, v $ session s WHERE l. object_id = o. object_id AND l. session_id = s. sid order by o. object_id, xidusn DESC www.2cto.com // the query result is as follows, we may want to know who has locked the table and who is waiting for the above statement to query who has locked the table and who is waiting. The preceding query result is a tree structure. If a subnode exists, it indicates that a wait occurs. If you want to know which rollback segment is used for the lock, you can also associate it with V $ rollname. xidusn is the USN of the rollback segment to find out which records are locked and kill it. Alter system kill session '2017 6 ';