Tag: compile

How to compile/drop public synonym?

-- compile public synonym that are invalid Select 'alter public synonym '||object_name||' compile;' From dba_objects Where status <> 'VALID' And owner = 'PUBLIC' And object_type = 'SYNONYM'; -- drop public synonym that are invalid Select 'drop  public synonym '||object_name||';' From dba_objects Where status <> 'VALID' And owner = 'PUBLIC' And object_type = 'SYNONYM';

How to find DDL lock on objects?

The following example shows how to find lock on a store procedure, the following store procedure has infinite loop.  A store-procedure is locked when it's running that it can't be modified/recompiled when it's executing. Window 1) SQL> create or replace procedure p as begin while true loop null; end loop; end; / SQL> exec p; … Continue reading How to find DDL lock on objects?