在处理OGG相关的表时由于操作失误造成如下错误:
ADMIN@bl1> create table t as select * from dba_jobs;
create table t as select * from dba_jobs
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-04045: errors during recompilation/reva lidation of
GOLDENGATE.DDLREPLICATION
ORA-04064: not executed, invalidated
ORA-04064: not executed, invalidated package body "GOLDENGATE.DDLREPLICATION"
ORA-06508: PL/SQL: could not find program unit being called:
"GOLDENGATE.DDLREPLICATION"
ORA-06512: at line 60
ORA-06508: PL/SQL: could not find program unit being called:
"GOLDENGATE.DDLREPLICATION"
ORA-06512: at line 60
ADMIN@bl1> alter package GOLDENGATE.DDLREPLICATION COMPILE BODY ;
alter package GOLDENGATE.DDLREPLICATION COMPILE BODY
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-04045: errors during recompilation/reva lidation of
GOLDENGATE.DDLREPLICATION
ORA-04064: not executed, invalidated
ORA-04064: not executed, invalidated package body "GOLDENGATE.DDLREPLICATION"
ORA-06508: PL/SQL: could not find program unit being called:
"GOLDENGATE.DDLREPLICATION"
ORA-06512: at line 60
ORA-06508: PL/SQL: could not find program unit being called:
"GOLDENGATE.DDLREPLICATION"
ORA-06512: at line 60
?
处理方法:重新删除并重建OGG的DDL支持。
SYS@bl1> @ddl_disable
Trigger altered.
SYS@bl1>?@ddl_remove.sql
DDL replication removal script.
WARNING: this script removes all DDL replication objects and data.
NOTE: The schema must be created prior to running this script.
Enter Oracle GoldenGate schema name:goldengate
Working, please wait ...
Spooling to file ddl_remove_spool.txt
Script complete.
SYS@bl1>?@marker_remove.sql
Marker removal script.
WARNING: this script removes all marker objects and data.
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
Enter Oracle GoldenGate schema name:goldengate
PL/SQL procedure successfully completed.
Sequence dropped.
Table dropped.
Script complete.
SYS@bl1>?@marker_setup.sql
Marker setup script
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter Oracle GoldenGate schema name:goldengate
Marker setup table script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GOLDENGATE
MARKER TABLE
-------------------------------
OK
MARKER SEQUENCE
-------------------------------
OK
Script complete.
SYS@bl1>?@ddl_setup.sql
Oracle GoldenGate DDL Replication setup script
Verifying that current user has privileges to install DDL Replication...
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Oracle 11g and later, it can be enabled.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter Oracle GoldenGate schema name:goldengate
Working, please wait ...
Spooling to file ddl_setup_spool.txt
Checking for sessions that are holding locks on Oracle Golden Gate metadata tables ...
Check complete.
WARNING: Tablespace GOLDENGATE does not have AUTOEXTEND enabled.
Using GOLDENGATE as a Oracle GoldenGate schema name.
Working, please wait ...
DDL repl