OGG应用进程abend报错无法insert虚拟列

环境11.2.0.4 linux6.9 RAC2节点,ogg版本Version 12.2.0.1.160823 OGGCORE_OGGADP.12.2.0.1.0_PLATFORMS_161019.1437

应用进程abend 观察报错信息,insert 虚拟列报错。

总结方法:

1.源端抽取进程,对表的列进行明确定义,抽取哪些列

2.目标端也对列进行明确定义

3.目标端应用需要应用源端定义列后的变更记录,因此可以说会丢失一部分的变更数据,或者重新初始化同步。

或者另外一种方法是源端删除虚拟列.但是目标端也会抛弃一部分数据类似。

目标端,应用进程修改
[oracle]$ ./ggsci Oracle GoldenGate Command Interpreter for Oracle Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO Operating system character set identified as UTF-8.

应用进程报错信息如下: view report rp02
2020-05-20 16:57:57  INFO    OGG-06510  Using the following key columns for target table hr.a: D_ID.
Exception in thread "main" oracle.goldengate.util.GGException: Unable to commit transaction, STATUS=ABEND, java.sql.SQLException: ORA-54013: 不允许对虚拟列执行 INSERT 操作

如下是应用进程参数信息 GGSCI (dsapdb26) 2> edit param rp02 REPLICAT rp02 getEnv (LD_LIBRARY_PATH) TARGETDB LIBFILE libggjava.so SET property=dirprm/java.proes GROUPTRANSOPS 10 MAXTRANSOPS 10 GETUPDATEBEFORES MAP scott.a,TARGET hr.a; MAP scott.b,TARGET hr.b,filter (@GETENV (transaction‘, csn‘) > 498252132);


如下是源端抽取进程参数信息
GGSCI> view param exta
extract exta
tranlogoptions dblogreader
EXTTRAIL /ogg/ext/dirdat/ea
USERID ogg,PASSWORD xx_scott_passwd
TABLE scott.a ,keycols(R_ID);

SQL> desc scott.a
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 R_ID                                   NOT NULL VARCHAR2(128)
 P_ID                                              VARCHAR2(128)
······  省略若干字段
 SQL> desc hr.a
ERROR:
ORA-04043: object hr.a does not exist
GGSCI (dsapdb26) 3> info exta showch
  Current Checkpoint (position of last record read in the data source):
Thread #: 1
Sequence #: 3886
RBA: 93687312
Timestamp: 2020-05-20 16:43:37.000000
SCN: 1.775085393 (5070052689)
Redo File: Not Available

对报错的a表进行修改参数

思路:源端抽取参数添加表列的信息;

          目标端应用参数添加表列对照信息;

源端抽取进程修改
GGSCI> edit param exta TABLE scott.a,keycols(R_ID),cols(R_ID,P_ID······); GGSCI> stop exta GGSCI> start exta

目标端进程修改
GGSCI> edit param rp02
MAP scott.a(R_ID,P_ID,······) ,TARGET hr.a ,keycols(R_ID),COLMAP(R_ID=R_ID,P_ID=P_ID,······),filter (@GETENV (‘transaction‘, ‘csn‘) > 5070052689);

重启之后,发现a表无异常,但是应用进程的b表报错了,报错一致,也是无法对虚拟列进行insert操作!

对报错的b表进行修改参数

思路:源端抽取参数添加表列的信息;

          目标端应用参数添加表列对照信息;

源端对抽取的列进行cols参数配置
GGSCI> edit param exta TABLE scott.b,cols(D_ID,D_TYPE,LOG_xx······); GGSCI> info exta showch --找最小的 Current Checkpoint (position of last record read in the data source): Thread #: 1 Sequence #: 3886 RBA: 408493188 Timestamp: 2020-05-20 17:08:14.000000 SCN: 1.775699573 (5070666869) Redo File: Not Available Current Checkpoint (position of last record read in the data source): Thread #: 2 Sequence #: 3028 RBA: 53161628 Timestamp: 2020-05-20 17:08:14.000000 SCN: 1.775699561 (5070666857) Redo File: Not Available --目标端修改,修改前 MAP scott.b,TARGET hr.b (@GETENV (transaction, csn) > 4899407917); 修改后 MAP scott.b(D_ID,D_TYPE,LOG_······) ,TARGET hr.b,COLMAP(D_ID=D_ID,D_TYPE=D_TYPE,LOG_······),filter (@GETENV (transaction, csn) > 5070666857);
重启EXT抽取进程后,重启应用REP进程

 

OGG应用进程abend报错无法insert虚拟列

上一篇:【Linux】开放指定端口


下一篇:linux定时压缩历史日志文件实现方式--shell脚本