SELECT
a.sid, a.serial#, a.username, a.process, b.object_name,
DECODE(c.lmode,2,'RS',3,'RX',4,'S',5,'SRX',8,'X','NO') "TABLE LOCK",
DECODE(a.command,2,'INSERT',3,'SELECT',6,'UPDATE',7,'DELETE',12,'DROP TABLE',26,'LOCK TABLE','UNknown') "SQL",
DECODE(a.lockwait, NULL,'NO wait','Wait') "STATUS"
FROM
v$session a, dba_objects b, v$lock c
WHERE
a.sid=c.sid and b.object_id=c.id1
AND c.type='TM';
검색결과========================================================================
427 4906 디비스키마 10812:10836 테이블명 RX UNknown NO wait
실행문==========================================================================
ALTER SYSTEM KILL SESSION '427,4906'
|