To compile invalid objects from script

To compile invalid objects from script

SQL> select 'ALTER ' || OBJECT_TYPE || ' ' || OWNER || '.' || OBJECT_NAME || ' COMPILE;' from dba_objects where status = 'INVALID' and object_type in

('PACKAGE','FUNCTION','PROCEDURE');

>>> To View Oracle Compile invalid object Errors

select * from SYS.USER_ERRORS where NAME = <object_name> and type = <object_type>

e.g. select * from SYS.USER_ERRORS where NAME = 'AST_UWQ_OLIST_WORK_ACTION' and TYPE = 'PACKAGE BODY'

The type column can be types such as the following:

PROCEDURE
FUNCTION
PACKAGE
PACKAGE BODY
TRIGGER

No comments:

Post a Comment