Oracle's table locking and unlocking
Oracle looks at the locked-down table and locks the dead process.
Select Sess.sid, sess.serial#, lo.oracle_username, lo.os_user_name, ao.object_name, Lo.locked_mode from v$locked_object lo, dba_objects ao, v$session sesswhere ao.object_id = lo.object_id and lo.session_id = sess.sid;--Unlocked--Log in to the database with DBA authority user. 1. Select * from V$locked_object isolated objects that are locked, where object_id is the object id,session_id is locked object has session id;2, select Object_name, object_ The type from dba_objects where object_id = The object_id that was just looked up; (according to the object_id in V$locked_object) This is to check the name of the object being locked, If it is possible to determine which table is locked and to be unlocked, then execute 3, select SID, Serial#, Machine, program from v$session where sid = 1th step in the session_id detected; (is based on v$ Locked_object corresponding to the lock record of the session_id found) then 4, alter system kill session ' sid,serial# '; used to kill the session; The above steps will solve the problem of object locking. Also attached is a statement locking a table: Lock table TableName in EXCLUSIVE MODE; the entire table will be locked
Oracle's table locking and unlocking