Compilation Lockup

Please help save me from myself. I frequently try to recompile packages while they are in use elsewhere, such as in a scheduled job. This causes Toad to hang, even if the Cancel button is pushed. Can you check to see if the package/procedure/function or view is in use and give me a "Really? You really want to do this?" warning? This would save me a lot of grief resetting things after I make the mistake.

Hi Brian,

What version are you on? I fixed something very similar a few versions ago.


Toad for Oracle Xpert (64-bit)

Add Ons: DB Admin Module


I don't see a great way in the data dictionary to tell if a package is in use. All I see on the internet is various ways of looking at currrent SQL of different sessions and trying to determine if there is a package call in there.


I may have found a way: I set up a long running job and then searched DBA_DDL_LOCKS:



Ah. Good call. I'll explore that soon. Will probably make it an option.

Hey Brian,

I know it's been a while, but I just tried this today. The data in dba_ddl_locks doesn't seem very reliable. It adds a row for an object when I start running a procedure (with MODE_HELD=Null and MODE_REQUESTED=None!). And the data does not change when the other session finishes running the procedure. The row isn't deleted until the session that was running the procedure disconnects. :frowning:

I could do this SQL, but I'm afraid it might be slow for some users:

Select l.session_id
from sys.dba_ddl_locks l, v$session s, dba_objects o
where l.owner = 'JDORLON'
and = 'SLOW_PROC'
and s.status = 'ACTIVE'
and l.SESSION_ID = s.sid
and o.owner = l.owner
and o.object_name =
and o.object_id in (s.plsql_entry_object_id, s.plsql_object_id);

I'll add this as an option (defaulted to unchecked) for next beta. It'll be under Options -> Execute/Compile and affect 2 places:
F9 from the Editor
Rt-click -> Compile from Schema Browser