--查询出锁表的会话
select a.owner,
a.object_name,
a.subobject_name,
a.object_type,
l.session_id,
l.oracle_username,
l.os_user_name,
se.sid,
se.serial#
from dba_objects a, v$locked_object l,v$session se
where a.object_id = l.object_id
and se.osuser = l.os_user_name
--杀session,可以解锁表的功能
alter system kill session 'sid,serial#';