Hi, This post shows the queries to find an active sessions for an object and kill the session.
Note: Use the query to kill a session only if you have authorized to kill the session.
Query to see if the object has an active session:
SELECT B.Owner, B.Object_Name, A.Oracle_Username, A.OS_User_Name, session_id
FROM V$Locked_Object A, All_Objects B
WHERE A.Object_ID = B.Object_ID
and b.object_id =:p_object_id;
Query to find the sis and serial# based on session id that is fetched from the above query:
select * from v$session where sid = '2777';
Command to kill the session using sis and serial#:
alter system kill session '2777,23685';
Happy learning. Cheers!!