Kill Session
有时候创建索引或修改表字段时,会提示资源正忙,可以查出表对应的进程并kill掉
select l.session_id,o.owner,o.object_name from v$locked_object l,dba_objects o where l.object_id=o.object_id; select t2.username,t2.sid,t2.serial#,t2.logon_time, 'alter system kill session '''||t2.sid||','||t2.serial#||''';' as SQS_T from v$locked_object t1,v$session t2 where t1.session_id=t2.sid order by t2.logon_time;