--运行词句检查是否有锁表
select object_name, machine, s.sid, s.serial#,s.LOGON_TIME
from vsession s
where l.object_id = o.object_id
and l.session_id = s.sid;
--运行此句生成解锁表语句
select 'alter system kill session '''||''||s.sid||','||s.serial#||''';'
from vsession s
where l.object_id = o.object_id
and l.session_id = s.sid;