Show exclusive locks on package / function

If you cannot compile and save updated source code of package / function etc. you need to find who is blocking it:


select distinct s.sid, s.username, l.name object_name, l.mode_held
from dba_ddl_locks l,
v$session s
where l.session_id = s.sid
and l.mode_held != 'Null' 
and l.name = '...your_package_name....'

 

Leave a Reply

Your email address will not be published. Required fields are marked *