Table Lock Query in Oracle

To find locked objects in Oracle –>
Use this Query to identify the locked objects  –>

select
   c.owner,
   c.object_name,
   c.object_type,
   b.sid,
   b.serial#,
   b.status,
   b.osuser,
   b.machine
from
   v$locked_object a ,
   v$session b,
   dba_objects c
where
   b.sid = a.session_id
and
   a.object_id = c.object_id;
To Remove lock use below query –>
alter system kill session ‘SID,SERIALl#’;
Example :
alter system kill session ‘607,1402’;

Continue reading →

Advertisements