we have a situation where the compiling of a package takes for ever!
if we compile the package with a new name then it works!

what I understood, Compiling hangs because of locks on the package!

something like this might help identify the problem!

```
    SELECT s.sid,
       l.lock_type,
       l.mode_held,
       l.mode_requested,
       l.lock_id1,
    FROM   dba_lock_internal l,
       v$session s
    WHERE s.sid = l.session_id
    AND UPPER(l.lock_id1) LIKE '%PROCEDURE_NAME%'
    AND l.lock_type = 'Body Definition Lock';

```

also this

```
select 
   x.sid 
from 
   v$session x, v$sqltext y
where 
   x.sql_address = y.address
and 
   y.sql_text like '%PROCEDURE_NAME%';

```

is it only **'body Definition Lock'** that prevent the compiling?
is there any other lock types that prevent the compiling?

**how to avoid the locks and do the compiling? by killing the sessions only? is there something else?**