数据库升级后goldengate报错,ORA-04045

 

ORA-04045: errors during recompilation/revalidation of GGATE.DDLREPLICATION

Linux平台,将数据库从10.2.0.1.0升级到10.2.0.5.0后报错: ORA-04045: errors during recompilation/revalidation of GGATE.DDLREPLICATION

试图重新编译该packagepackage body,均报错:

SQL> alter package GGATE.DDLREPLICA compile package;

alter package GGATE.DDLREPLICA compile package

*

ERROR at line 1:

ORA-00604: error occurred at recursive SQL level 1

ORA-04045: errors during recompilation/revalidation of GGATE.DDLREPLICATION

ORA-04064: not executed, invalidated

ORA-04064: not executed, invalidated package body "GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit being called:

"GGATE.DDLREPLICATION"

ORA-06512: at line 870

ORA-04064: not executed, invalidated package body "GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit being called:

"GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit being called:

"GGATE.DDLREPLICATION"

ORA-06512: at line 870

ORA-04045: errors during recompilation/revalidation of GGATE.DDLREPLICATION

ORA-04064: not executed, invalidated

ORA-04064: not executed, invalidated package body "GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit being called:

"GGATE.DDLREPLICATION"

ORA-06512: at line 870

ORA-04064: not executed, invalidated package body "GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit

SQL> alter package GGATE.DDLREPLICA compile body;

alter package GGATE.DDLREPLICA compile body

*

ERROR at line 1:

ORA-00604: error occurred at recursive SQL level 1

ORA-04045: errors during recompilation/revalidation of GGATE.DDLREPLICATION

ORA-04064: not executed, invalidated

ORA-04064: not executed, invalidated package body "GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit being called:

"GGATE.DDLREPLICATION"

ORA-06512: at line 870

ORA-04064: not executed, invalidated package body "GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit being called:

"GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit being called:

"GGATE.DDLREPLICATION"

ORA-06512: at line 870

ORA-04045: errors during recompilation/revalidation of GGATE.DDLREPLICATION

ORA-04064: not executed, invalidated

ORA-04064: not executed, invalidated package body "GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit being called:

"GGATE.DDLREPLICATION"

ORA-06512: at line 870

ORA-04064: not executed, invalidated package body "GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit

SQL> alter package GGATE.DDLREPLICA compile;

alter package GGATE.DDLREPLICA compile

*

ERROR at line 1:

ORA-00604: error occurred at recursive SQL level 1

ORA-04045: errors during recompilation/revalidation of GGATE.DDLREPLICATION

ORA-04064: not executed, invalidated

ORA-04064: not executed, invalidated package body "GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit being called:

"GGATE.DDLREPLICATION"

ORA-06512: at line 870

ORA-04064: not executed, invalidated package body "GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit being called:

"GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit being called:

"GGATE.DDLREPLICATION"

ORA-06512: at line 870

ORA-04045: errors during recompilation/revalidation of GGATE.DDLREPLICATION

ORA-04064: not executed, invalidated

ORA-04064: not executed, invalidated package body "GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit being called:

"GGATE.DDLREPLICATION"

ORA-06512: at line 870

ORA-04064: not executed, invalidated package body "GGATE.DDLREPLICATION"

ORA-06508: PL/SQL: could not find program unit

metlink上找到一篇文档,原来是数据库上部署了goldenGate 基于ddl的复制,升级前需要先disable 触发器,然后升级,最后enable 触发器;

如果没有按照此步骤来操作并且已经报错了,可以重新运行相关脚本,创建包和包体。

附:

Do I Need To Disable The GoldenGate DDL Trigger Before An Oracle DB Upgrade or PSU patching? [ID 971222.1]

In this Document
  Solution
  
References

Applies to:

Oracle GoldenGate - Version: 4.0.0 and later   [Release: 4.0.0 and later ]
Information in this document applies to any platform.

Solution

Issue:
If you are performing any Oracle database upgrades, for example CPU/PSU patch upgrade, and you are currently capturing Oracle DDL operations with GoldenGate, disable the GoldenGate DDL trigger before the upgrade and then enable it after the upgrade. Use the ddl_disable and ddl_enable scripts in the GoldenGate installation directory for this purpose.

Solution Description:
Patches and upgrades can modify Oracle???s internal tables and views. This can cause stored procedures that call them to be invalidated. All dependent objects are invalidated as well.

The ALTER COMPILE is DDL, and because parts of the DDL package are invalidated, it cannot execute. Because Oracle patches and upgrades are generally NOT replicated by GoldenGate (replication is stopped, then upgrades or patches are done on both source and target), there should be no gaps. Also, because upgrades and patches generally operate on Oracle-reserved objects (which GoldenGate filters out), there should not be any patch-related DDL operations that are replicated, even if for some reason replication is not stopped during the patch.

To apply the Oracle patch:

Before applying a database patch to an environment that has an active GoldenGate DDL trigger, follow this procedure:

1. Log into SQL*Plus as sysdba and execute the ddl_disable script.

2. Apply the Oracle patch.

3. If you are still on the same major Oracle version (for example, you went from 9.2.0.6 to 9.2.0.8), enable the trigger again by executing the ddl_enable script as sysdba. If you are upgrading to a newer major version (for example, from 10.1.x to 10.2.x), download and install a new GoldenGate version before re-enabling the DDL trigger.

If you don't follow the procedure of disabling the DDL trigger before upgrade or patching, after the Database version upgrade or CPU/PSU patch complete, you will run into various issues with GoldenGate DDL replication package, typical error messages looks like below

OCI error (4045-ORA-04045: errors during recompilation/revalidation of PUBLIC.ALL_TAB_COLUMNS 

ORA-04064: not executed, invalidated  ORA-04064: not executed, invalidated package body "GGS_DDL.DDLREPLICATION" ORA-06508: PL/SQL: could not find program unit being called: "GGS_DDL.DDLREPLICATION" ORA-06512: at line 837 ORA-04064: not executed, invalidated package body "GGS_DDL.DDLREPLICATION" ORA-06508: PL/SQL: could not find program unit being called: "GGS_DDL.DDLREPLICATION" ORA-06508: PL/SQL: could not find program unit being called: "GGS_DDL.DDLREPLICATION" ORA-06512: at line 837 ORA-04045: errors during recompilation/revalidation of GGS_DDL.DDLREPLICATION ORA-04064: not executed, invalidated  ORA-04064: not executed, invalidated package body "GGS_DDL.DDLREPLICATION" ORA-06508: PL/SQL: could not find program unit being called: "GGS_DDL.DDLREPLICATION" ORA-06512: at line 837 ORA-04064: not executed, invalidated package body "GGS_DDL.DDLREPLICATION" ORA-06508: PL/SQL: could not find program unit being called: "GGS_DDL.DDLREPLI) initializing query to obtain NUMBER precision (table: 'xxxx.yy', column: 'Cc'), try to fix this issue in order to avoid possible fatal error.

If that happens, you have to reinstall the DDL replication package.  Please see detail on how to install DDL replication package in the installation guide.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21256317/viewspace-1063585/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/21256317/viewspace-1063585/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值