1. ORACLE中查看當(dāng)前系統(tǒng)中鎖表情況 查詢SQL如下: 1 2 3 4 5 6 7 8 9 | select sess.sid,
sess.serial#,
lo.oracle_username,
lo.os_user_name,
ao.object_name,
lo.locked_mode
from v$locked_object lo, dba_objects ao, v$session sess, v$process p
where ao.object_id = lo.object_id
and lo.session_id = sess.sid<br> and object_name = 'MOV_MSTR' <br>
|
查詢是什么SQL引起了鎖表的原因,SQL如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | select l.session_id sid,
s.serial#,
l.locked_mode,
l.oracle_username,
s. user #,
l.os_user_name,
s.machine,
s.terminal,
a.sql_text,
a. action
from v$sqlarea a, v$session s, v$locked_object l
where l.session_id = s.sid
and s.prev_sql_addr = a.address
order by sid, s.serial#;
|
2. ORACLE解鎖的方法 1 | alter system kill session 'SID,serial#' ; SID和Serial#共同確定一唯一的session?!?/code>
|
與你共親到無(wú)可親密時(shí),便知友誼萬(wàn)歲是盡頭。
|