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:
you can take and idea from it.
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....
check if synonym count in schema .it should be same in prod and test.
check if any synonym is missing.
yes synonym count matches with prod..
only 1 object with error
error during recompilation zero...
and there is full list of invalid objects.... confuisng..
Edited by: khallas301 on Dec 4, 2012 7:27 AM
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.
yes it does exist... and synonym doesn't appears in invalid objects list...
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...
I'm really trying to help, but it's hard to do when you're not replying to the questions.
Sorry I thought I answered all questions... not sure what missed...
Function compilation error was:
PLS-00302: component 'max' must be declared.
I am reviewing all steps from start and see what i missed..
Error: PLS-3021 person found this helpful
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.
Thanks for that.. I am going through invalid function and view text all again and try to figure missing part...
There were some tables excluded in impdp/expdp and invalid objects were dependent on them due to which compile was failing..