oracle的鎖表及處理

2021-10-24 08:47:02 字數 324 閱讀 5592

1.執行一下sql,查詢出被鎖表的session和serial#

select b.username,b.sid,b.serial#,logon_time

from v$locked_object a,v$session b

where a.session_id = b.sid order by b.logon_time

上面的sql語句會查詢出被鎖住的事務,下面根據查詢出的session_id和serial#,把這個事務刪除就可以

2.刪除事務

alter system kill session 'session_id,serial#';  

Oracle鎖表處理

1 查詢出被鎖的表的session id,和serial select l.session id sid,s.serial l.locked mode,l.oracle username,l.os user name,s.machine,s.terminal,o.object name,s.logo...

oracle鎖表處理

1 select from v locked object 查出被鎖定的物件,其中object id是物件的id,session id是被鎖定物件有session id 2 select object name,object type from dba objects where object id...

Oracle表鎖死處理

查詢被鎖的表 select from v session where sid in select lockobj.session id from v locked object lockobj left join dba objects objs on lockobj.object id objs....