Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Using utlrp.sql and utlprp.sql .these scripts are run after major database changes
sys user or any user with sysdba priv.The utlrp.sql calls utlprp.sql script with a
In a typical running application, you would not expect to see views or stored procedures become
invalid because applications typically do not change table structures or change view or stored procedure
definitions during normal execution. Changes to tables, views, or PL/SQL units typically occur when an
application is patched or upgraded using a patch script or ad-hoc DDL statements. Dependent objects might
be left invalid after a patch has been applied to change a set of referenced objects.
76. packages and package bodies gong invalid when I make schema changes. How
do I recompile invalid objects?
Here is a script to recompile invalid PL/SQL packages and package bodies
invalid.sql
Spool run_invalid.sql
select
'ALTER ' || OBJECT_TYPE || ' ' ||
OWNER || '.' || OBJECT_NAME || ' COMPILE;'
from
dba_objects
where
status = 'INVALID'
and
object_type in ('PACKAGE','FUNCTION','PROCEDURE');
spool off;
@run_invalid.sql