首页 > 代码库 > oracle锁表解锁

oracle锁表解锁

select substr(object_name,1,30),substr(os_user_name,1,20) from v$locked_object,user_objects
where v$locked_object.object_id = user_objects.object_id

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 t2.username,t2.sid,t2.serial#,t2.logon_time,t3.sql_text
from v$locked_object t1,v$session t2,v$sqltext t3
where t1.session_id=t2.sid
and t2.sql_address=t3.address
order by t2.logon_time


  SELECT OBJECT_ID,SESSION_ID,SERIAL#,
ORACLE_USERNAME,OS_USER_NAME,S.PROCESS
FROM V$LOCKED_OBJECT A,
V$SESSION S WHERE A.SESSION_ID=S.SID

oracle锁表解锁