Thursday, April 16, 2009

Session(s) locking a pl/sql package

When you try to compile a package, some times you get following error

ORA-04021: timeout occurred while waiting to lock object <Your Package Name>

The query given below can give you information about session locking your package.

SELECT dli.*, vs.*
FROM dba_lock_internal dli
, v$session vs
WHERE dli.lock_id1 like '%:Package_Name%'
AND vs.sid = dli.session_id
ORDER BY session_id

1 comment:

  1. Wow. Awesome article. Please do more articles like this in the future. Very informational and knowledgeable. I will expect more from you in the future. For now i will just bookmark your page and surely I'm gonna come back later to read more. Thank you to the writer!