alter system kill session (select q'<'12>' || session_id || ',' || serial || q'<'12>' from (SELECT max(l.session_id ) session_id, max(s.serial# ) serial FROM v$locked_object l, all_objects o, v$session s WHERE l.object_id = o.object_id AND l.session_id = s.sid group by l.session_id, s.serial#)) ; end loop; end;