Get locked tables and release it

Technical 0 Comments

Find locked tables

---------------------------------------
select
oracle_username,
os_user_name,
locked_mode,
object_name,
object_type
from
v$locked_object a,dba_objects b
where
a.object_id = b.object_id;

 

Remove lock from table

--------------------------------------------
SELECT SID,SERIAL# , 'alter system kill session ''' || SID || ',' || serial# ||''';'
FROM V$SESSION 
WHERE SID IN (SELECT SESSION_ID 
FROM DBA_DML_LOCKS 
WHERE NAME = 'MATRECTRANS') 

Share this post


Blog Comments


Post your comment






Thank You! You comment is under review and will be published soon..
Thank You! You comment is Published.