日期:2014-05-16  浏览次数:20746 次

oracle锁表处理
select * from v$locked_object; /*查看被锁的表*/

select l.oracle_username User_name,
o.owner,
o.object_name,
o.object_type,
s.sid,
s.serial# /*查谁在锁表-.-*/
from v$locked_object l, dba_objects o, v$session s
where l.object_id = o.object_id
and l.session_id = s.sid
order by o.object_id desc;

alter system kill session '1025, 9136';

select spid, osuser, s.program
from v$session s,v$process p
where s.paddr=p.addr and s.sid=1025