Oracle EBS 锁
这里仅提供查询锁和解锁。有时,锁是正常的,所以杀掉正锁着的进程有一定的风险性。 具体步骤如下: -- 1.0 查看 holder的进程 SELECT DECODE(request, 0, 'Holder: ', 'Waiter: ') || sid sess, id1, id2, lmode, request, type FROM V$LOCK WHERE (id1, id2, type) IN (SELECT id1, id2, type FROM V$LOCK WHERE request > 0) ORDER BY id1, request; -- 2.0 看 lock的表 SELECT DOB.OBJECT_NAME, VSS.CLIENT_IDENTIFIER, LO.SESSION_ID || ',' || VSS.SERIAL#, LO.LOCKED_MODE, VSS.SERIAL#, VSS.ACTION, VSS.OSUSER, VSS.LOGON_TIME, VSS.PROCESS, VPS.SPID, VSS.* FROM V$LOCKED_OBJECT LO, DBA_OBJECTS DOB, V$SESSION VSS, V$PROCESS VPS WHERE LO.OBJECT_ID = DOB.OBJECT_ID AND LO.SESSION_ID = VSS.SID AND VSS.PADDR = VPS.ADDR and VSS.SID = ; -- 值去 1.0 sess 字段 holder: 后的数字 -- 3.0 查看状态 SID SERIAL select * from v$session where sid = ;-- 值去 1.0 sess 字段 holder: 后的数字 -- 4.0 如果状态是 INACTIVE 等,酌情kill ALTER SYSTEM KILL SESSION ' , ';-- 分别取 3.0 SID SERIAL
土豆君