I have import dumpfile for schema refresh but when import completes it made many packages and procedures invalid....
Package compilation error:
pl/sql: Declaration ignore
PLS-00201: identifier 'schema_T_Dump.em_id' must be declared..
I have tried all sort of compilation things but still packages are invalid..
I think type is missing in target database from source...
don't have Toad or SQL developer for review....
any quick tips.. I am going clueless
Edited by: khallas301 on Dec 4, 2012 7:03 AM
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....
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.
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...
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..
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.