在Oracle 10g的Enterprise Manager中找了半天没找到锁的管理模块,无奈写了一个锁视图脚本:
select c.owner, c.object_name, c.object_type, b.sid, b.serial#, b.status, b.osuser, b.machine from
v$locked_object a, v$session b, dba_objects c
where b.sid = a.session_id
and a.object_id = c.object_id;
然后可以用下面的语句来杀死会话:
alter system kill session 'sid,serial#' immediate;