解決Oracle 表鎖定

2021-05-27 03:18:30 字數 601 閱讀 1417

select b.owner, b.object_name, a.session_id, a.locked_mode

from v$locked_object a, dba_objects b

where b.object_id = a.object_id

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

--查詢鎖定表

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

--alter system kill session 'sid,serial#';

--把鎖給kill掉 解鎖

alter system kill session '550,135';

Oracle 解決表鎖定的問題

1.通過v session,v locked object檢視誰鎖定了資源 select t1.sid,t1.serial t1.username,t1.logon time from v session t1 v locked object t2 where t1.sid t2.session i...

解除oracle表鎖定

首先查詢阻塞的使用者 select rule s.username,decode l.type,tm table lock tx row lock null lock level,o.owner,o.object name,o.object type,s.sid,s.serial s.termina...

oracle 資料表被鎖定解決辦法

今天操作oracle資料庫時,更新一張表中的乙個字段值,一直沒有更新成功,後來發現,表被別的使用者鎖定,後來採用下面的方法解決了這個問題!update ems csg set device id csg000000000000001 where name viss csg 上面的sql語句執行後,表...