This content has been marked as final. Show 15 replies
There a number of reasons why certain object could be invalid at the end of the import session.
- underlying objects are in different schemas and either missing or have different structure etc.
- grants are missing in the same situation as above
- public database links are missing
Could you be a little more specific?
In general you can try and recompile the objects connecting as sysdba and running:
Thanks for quick reply...
I did run utlrp.sql after import....
unfortunately also check that given link before but error is not for dbms_system
also was checking function... function body is same for prod and test but in test receiving below error during recompile:
PLS:00302 component 'xxx' must be declared....
Have you checked if that component 'xxx' actually exists in the database and if it does the owner of the function's schema has all the necessary privileges to assess it?
The objects could show to be 'INVALID' for many reasons. For example in 11g synonyms pointing to a non-existing objects are considered invalid. Materialized views could show INVALID status in dba_objects while being perfectly fine.
Is it in the same schema as a function that references it? If not, then does the function's schema owner have DIRECTLY granted access (please remember that grants through the role do not work)?
What is that component anyway?
A lot of times it's just a single misbehaving object and a bunch of dependent objects that become invalid in the result of chain reaction.
that xxx component is function... I tried all objects recompiling individually but fails....
View recompile fails:
warning: view altered with compilation errors
errors: ORA-00942 table or view does not exist
also many materialized failed to create with error in original import log but now they do appear in target with valid status...
Text: component '%s' must be declared
Cause: In a reference to a component (for example, in the name "A.B",
"B" is a component of "A"), the component has not been declared.
The component might be misspelled, its declaration might be
faulty, or the declaration might be placed incorrectly in the
Action: Check the spelling and declaration of the component. Also confirm
that the declaration is placed correctly in the block structure.