用有权限的账户登录数据库,例如 system 用户
SELECT
'alter system kill SESSION ''' || b.sid || ',' || b.serial # || ''';' sqls,
b.sid,
b.serial #,
logon_time,
c.object_name,
c.OWNER
FROM
v$locked_object a,
v$session b,
all_objects c
WHERE
a.session_id = b.sid
AND c.object_id = a.object_id
将 sqls 列的内容复制出来执行就可以解除死锁