oracle 10gdelete from rpt_dayrationout@report * ERROR at line 1: ORA-02049: timeout: distributed transaction waiting for lock ORA-02063: preceding line from REPORT 为什么总是锁表呢,杀完了,下次还有
死鎖了,看看是不是 其他session 有鎖等待 select /*+rule*/ -- a.kaddr, -- (select username from v$session where sid = a.sid) username, a.sid, (select serial# from v$session where sid = a.sid) serial#, -- (select ctime from v$lock where KADDR = a.kaddr) ctime, -- a.type, a.id1, a.id2, a.lmode, a.request, a.block, b.sid blocking_sid from v$lock a, ( select * from v$lock where request > 0 and type <> 'MR' ) b where a.id1 = b.id1(+) and a.id2 = b.id2(+) and a.lmode > 0 and a.type <> 'MR' order by username,a.sid,serial#,a.type
select /*+rule*/
-- a.kaddr, --
(select username from v$session where sid = a.sid) username,
a.sid,
(select serial# from v$session where sid = a.sid) serial#,
-- (select ctime from v$lock where KADDR = a.kaddr) ctime, --
a.type,
a.id1,
a.id2,
a.lmode,
a.request,
a.block,
b.sid blocking_sid
from v$lock a,
( select * from v$lock
where request > 0
and type <> 'MR'
) b
where a.id1 = b.id1(+)
and a.id2 = b.id2(+)
and a.lmode > 0
and a.type <> 'MR'
order by username,a.sid,serial#,a.type
我delete后,然后insert,然后commit 。有commit
1 6F73943C 154 19 48595 6F654E9C 61 INTER 7 2147483644 6E23B5D4 ACTIVE DEDICATED 61 INTER zhichi 16879 dca01a0 oracle@dca01a0 (TNS V1-V3) USER 6B8D7BD8 2345475216 5nnjbhq5wu74h 0 6B8EF838 2133318335 09rx8z9zkgqpz 0 oracle@dca01a0 (TNS V1-V3) 0 0 46154 52661 61 22619 0 2011/11/08 15:37:35 1068 NO NONE NONE NO DISABLED ENABLED ENABLED 0 NO HOLDER 60100 115 db file sequential read file# 61 0000003D block# 22619 0000585B blocks 1 00000001 1740759767 8 User I/O 0 0 WAITING SYS$USERS DISABLED FALSE FALSE
感觉要是没有提交的话,再写进去???会错吗?