Let's Join and share our day to day activities, Views, Knowledge, Questions and achievements in Oracle Database (8i / 9i / 10g or 11g)

Jan 7, 2015

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