修改表记录时报record is locked by another user,但是在V$LOCKED_OBJECT里又没有这个表
如何才能把这个USER给找出来,干掉啊
在线等

解决方案 »

  1.   

    在v$transaction中也没有这个表相关SESSION
      

  2.   

    都已经LOCK了你怎么修改?
    你要先COMMINT
      

  3.   

    SELECT A.OBJECT_NAME, A.STATUS, V.SESSION_ID
      FROM ALL_OBJECTS A, V$LOCKED_OBJECT V
     WHERE A.OBJECT_ID = V.OBJECT_ID
       AND A.OBJECT_NAME LIKE '表名';
      

  4.   

    你在一个进程里update这条记录——这个进程将处于等待状态,
    然后你另开连接,执行以下语句--查等待进程
    select * from gv$lock where request > 0 ;--查持有锁进程
    select a.inst_id, a.sid, b.ctime,b.id1, a.sql_id,
           'alter system kill session ''' || a.sid || ',' || serial# || ''';' kill,
           a.*, b.*
      from gv$session a, gv$lock b
     where a.inst_id = b.inst_id
       and a.sid = b.sid
       and b.id1 in (select id1 from gv$lock where request > 0)
       and b.lmode > 0
     order by a.inst_id, a.sid;