--查看那些表被锁了
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;
--杀会话
alter system kill session 'sid,serial#';
alter system kill session '29,5497';
--如果有ora-00031错误,则在后面加immediate;
alter system kill session '29,5497' immediate;
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;
--杀会话
alter system kill session 'sid,serial#';
alter system kill session '29,5497';
--如果有ora-00031错误,则在后面加immediate;
alter system kill session '29,5497' immediate;