解决方案:
select session_id from v$locked_object; --首先得到被锁对象的session_id
SELECT
sid, serial#, username, osuser FROM v$session where sid = session_id;
--通过上面得到的session_id去取得v$session的sid和serial#,然后对该进程进行终止。
ALTER SYSTEM KILL SESSION 'sid,serial';
example:
ALTER SYSTEM KILL SESSION '13, 8';
例如:
SELECT sid, serial#, username, osuser FROM v$session where sid in(
select session_id from v$locked_object)
ALTER SYSTEM KILL SESSION '144,2077'