select v$session.sid,
v$session.serial#,
v$process.spid,
rtrim(object_type) object_type,
rtrim(owner) || '.' || object_name object_name,
decode(lmode,0,'none',1, 'null', 2, 'row-s', 3,'row-x', 4,'share', 5,'s/row-x',6,'exclusive','unknown') lockmode,
decode(request,0,'none',1,'null', 2,'row-s',3,'row-x',4,'share',5,'s/row-x', 6,'exclusive','unknown') requestmode,
ctime,
block b,
v$session.username,
machine,
module,
action,
decode(a.type,'mr','media recovery','rt','redo thread','un','user name','tx','transaction','tm','dml','ul',
'pl/sql user lock','dx', 'distributed xaction','cf','control file','is','instance state',
'fs','file set','ir','instance recovery','st','disk space transaction','ts','temp segment',
'iv','library cache invalida-tion','ls','log start or switch','rw','row wait','sq',
'sequence number','te','extend table','tt','temp table', 'unknown') locktype
from (select * from v$lock) a, all_objects, v$session, v$process
where a.sid > 6
and object_name <> 'obj$'
and a.id1 = all_objects.object_id
and a.sid = v$session.sid
and v$process.addr = v$session.paddr;
ORACLE檢查死鎖
select sql hash value from v session where sid in select session id from v locked object 四 死鎖的解決方法 一般情況下,只要將產生死鎖的語句提交就可以了,但是在實際的執行過程中。使用者可 能不知道產生死鎖的語句...
oracle死鎖檢查方法
用dba登陸 sqlplus nolog conn as sysdba select username,lockwait,status,machine,program from v session where sid in select session id from v locked object...
SQL檢查死鎖情況
create procedure sp who lock asbegin declare spid intdeclare blk intdeclare count intdeclare index intdeclare lock tinyint set lock 0 create table tem...