使用下面查询语句查询: sid 与 serial#
SELECT
c.owner,c.object_name,c.object_type, b.sid, b.serial#, b.status, b.osuser, b.machine
FROM
v$locked_object a ,all_objects c ,v$session b
WHERE
b.sid = a.session_id AND a.object_id = c.object_id;
查询到后使用:
ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;
语句将被锁住的表解锁即可