2008. 12. 30. 16:13 오라클
Invalid SYS objects after schema level import for full export DMP file
Oracle Server - Enterprise Edition - Version: 9.00 to 10.00
This problem can occur on any platform.
Symptoms
After executing an import from a full export DMP file, the following SYS objects become invalid:
OBJECT_NAME | OBJECT_TYPE | STATUS |
---|---|---|
DBMS_REPCAT_RGT_CUST | PACKAGE BODY | INVALID |
DBMS_REPCAT_UTL4 | PACKAGE BODY | INVALID |
DBMS_REPCAT_MIGRATION | PACKAGE BODY | INVALID |
_ALL_REPCONFLICT | VIEW | INVALID |
USER_REPPARAMETER_COLUMN | VIEW | INVALID |
ALL_REPPARAMETER_COLUMN | VIEW | INVALID |
_ALL_REPPARAMETER_COLUMN | VIEW | INVALID |
DBA_REPPARAMETER_COLUMN | VIEW | INVALID |
_ALL_REPRESOLUTION | VIEW | INVALID |
_ALL_REPCOLUMN_GROUP | VIEW | INVALID |
_ALL_REPGROUPED_COLUMN | VIEW | INVALID |
USER_REPGROUPED_COLUMN | VIEW | INVALID |
ALL_REPGROUPED_COLUMN | VIEW | INVALID |
DBA_REPGROUPED_COLUMN | VIEW | INVALID |
USER_REPPARAMETER_COLUMN | SYNONYM | INVALID |
ALL_REPPARAMETER_COLUMN | SYNONYM | INVALID |
DBA_REPPARAMETER_COLUMN | SYNONYM | INVALID |
USER_REPGROUPED_COLUMN | SYNONYM | INVALID |
ALL_REPGROUPED_COLUMN | SYNONYM | INVALID |
DBA_REPGROUPED_COLUMN | SYNONYM | INVALID |
The alert.log of the database where the import was executed shows the following messages:
Replication pre-import:
trying to disable constraint REPCAT$_TEMPLATE_OBJECTS_FK1
for "SYSTEM"."REPCAT$_TEMPLATE_OBJECTS"
Replication pre-import:
constraint REPCAT$_TEMPLATE_OBJECTS_FK1 for
"SYSTEM"."REPCAT$_TEMPLATE_OBJECTS" is disabled successfully
...
Replication after-import:
trying to enable constraint REPCAT$_TEMPLATE_OBJECTS_FK1
for "SYSTEM"."REPCAT$_TEMPLATE_OBJECTS"
Replication after-import:
constraint REPCAT$_TEMPLATE_OBJECTS_FK1 for
"SYSTEM"."REPCAT$_TEMPLATE_OBJECTS" is enabled successfully
These messages appear for all constraints related to replication catalog
objects (SYSTEM.REPCAT$_%).
Cause
This is an expected behaviour because of the dependencies that exists between the objects being altered during the import and the objects being invalidated:
SQL> select object_name, object_id, object_type from dba_objects
2 where object_name = 'REPCAT$_PARAMETER_COLUMN';
OBJECT_NAME OBJECT_ID OBJECT_TYPE
------------------------------ ---------- -------------------
REPCAT$_PARAMETER_COLUMN 7680 TABLE
Objectes that have dependencies to REPCAT$_PARAMETER_COLUMN:
SQL> select d_obj# from dependency$ where P_OBJ#=7680;
D_OBJ#
----------
7893
7904
7950
7953
7964
7995
8009
7688
7686
7685
7683
select object_name, object_type, owner
2 from dba_objects
3 where object_id in (7893,7904,7950,7953,7964,7995,8009,7688,7686,7685,7683);
OBJECT_NAME OBJECT_TYPE OWNER
------------------------------ ------------------- ----------
DBMS_REPCAT_MIG_INTERNAL PACKAGE BODY SYS
DBMS_REPCAT_CONF PACKAGE BODY SYS
DBMS_OFFLINE_RGT PACKAGE BODY SYS
DBMS_REPCAT_SNA_UTL PACKAGE BODY SYS
DBMS_REPCAT_UTL PACKAGE BODY SYS
DBMS_MAINT_GEN PACKAGE BODY SYS
DBMS_DEFERGEN_RESOLUTION PACKAGE BODY SYS
USER_REPPARAMETER_COLUMN VIEW SYS
ALL_REPPARAMETER_COLUMN VIEW SYS
_ALL_REPPARAMETER_COLUMN VIEW SYS
DBA_REPPARAMETER_COLUMN VIEW SYS
The objects above depend on table REPCAT$_PARAMETER_COLUMN and thus may get invalidated if the table is altered.
Solution
The objects will be recompiled automatically the next time they are referenced. In the case ofthe synonyms, they will become valid the next time they are referenced after the object they point to becomes valid.