Thursday, May 21, 2009

DBA_INVALID_OBJECTS

1. DBA_INVALID_OBJECTS is new in 11g.

2. Run utlrp.sql to recompile any remaining stored PL/SQL and Java code, and the invalid objects are stored in DBA_INVALID_OBJECTS.

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

Verify that all expected packages and classes are valid:

SQL> SELECT count(*) FROM dba_invalid_objects;

SQL> SELECT distinct object_name FROM dba_invalid_objects;

The DBA_INVALID_OBJECTS is defined with query:

select "OWNER", "OBJECT_NAME", "SUBOBJECT_NAME", "OBJECT_ID", "DATA_OBJECT_ID",

"OBJECT_TYPE", "CREATED", "LAST_DDL_TIME", "TIMESTAMP", "STATUS",

"TEMPORARY", "GENERATED", "SECONDARY", "NAMESPACE", "EDITION_NAME"

from DBA_OBJECTS

where STATUS = 'INVALID' and

(OBJECT_TYPE != 'TYPE' or

(OBJECT_TYPE='TYPE' and SUBOBJECT_NAME is null))

Oracle data dictionary views

Oracle dynamic performance views

No comments:

Post a Comment