Professional Documents
Culture Documents
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...
APPLIES TO:
Oracle Database - Enterprise Edition - Version 8.1.7.4 to 11.2.0.3 [Release 8.1.7 to 11.2]
Information in this document applies to any platform.
Checked for relevance on 30-Jul-2012
PURPOSE
This document is intended to help customers in resolving invalid database objects problem.
SCOPE
This can be used to resolve / generate more debug information and contact support for resolving the problem.
This note covers basic database objects like views,procedures and packages.
It does not deal much in detail with invalid java objects. Articles referred in References section can help in resolving invalid JAVA objects.
DETAILS
A) Find Invalid Objects:
1.To Find the number of invalid objects :
select count(*) from dba_objects where status='INVALID';
select owner,object_type,count(*) from dba_objects where status='INVALID' group by owner,object_type;
2.To identify the object name and their types and owner:
select owner, object_name,object_type from dba_objects where status ='INVALID';
1 de 5
Document Display
2 de 5
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...
In case you have lots of invalid objects, you can generate scripts that will generate the sqls for compiling the invalid objects :
In sqlplus connect as sys:
set heading off
spool compileinvalid.sql
select 'alter '||object_type|| ' ' || owner ||'.'||object_name || ' compile;' from dba_objects where status='INVALID';
spool off
Then run compileinvalid.sql in sqlplus prompt as sys user.
To compile invalid package body use:
alter package <package_name> compile body;
C.1)From sqlplus
Type in sqlplus
Show errors
Immediately following the failing alter .. compile statement. This should show the cause of compilation error.
Note the error number and the error description and resolve the error.
C.2) From data dictionary view : dba_errors
If show errors returns no errors, then check in dba_errors :
Select text from dba_errors where name ='<Object_name>' and owner ='<owner_name>';
The above select would give the list of error messages that led to compilation error.
Document Display
3 de 5
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...
and/or do not exist (X$ table dropped) in the database post upgradation.
Its not recommended to have views based on X$ tables and if done, it is recommended to drop such views prior to database upgrade. You
can contact the developers or 3rd party vendors for alternate scripts. Refer Note 361757.1 for details.
More debugging
In certain cases, the structure of base table could have changed from one version to another version and this could be the cause of invalid
objects. This can be seen after upgrade. The following tracing would help in debugging such cases:
Document Display
4 de 5
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...
REFERENCES
NOTE:752783.1 - Data Dictionary Objects Invalid after Running catalog.sql, catproc.sql, utlrp.sql or catpatch.sql
BUG:2584802 - CATPROC SHOWS UP AS INVALID IN THE DBA_REGISTRY VIEW
NOTE:209870.1 - How to Reload the JVM in 9.2.0.X
NOTE:103536.1 - LoadJava Utility uploading Java files as Invalid
NOTE:106206.1 - ORA-04068 Errors From User-Written And Oracle Packages
Document Display
5 de 5
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-stat...
NOTE:1292089.1 - Master Note for Oracle XML Database (XDB) Install / Deinstall
NOTE:175472.1 - How to Reload the JVM in 8.1.7.X
Didn't find what you are looking for?