视图DBA_GOLDENGATE_SUPPORT_MODE引起的集成模式OGG不同步问题排查过程

0    378    2

Tags:

👉 本文共约4754个字,系统预计阅读时间或需18分钟。

现象

使用OGG 21.3可以远程同步Oracle 11.2.0.4的数据库,这个我之前已经测试过,参考:https://www.dbaup.com/shiyongogg-21-3yuanchengshishihuxiangtongbuoracle-11-2-0-4shuangzhu.html

然后,客户这边有个需求,需要同步Oracle 11.2.0.4的rac到单机环境,我也是按照这个过程配置的,但是配置完成后,extract进程不能抽取数据,很是奇怪,也不报错,只是“Lag at Chkpt”延迟一直在增大,执行stats exta报错“No active extraction maps.”,如下:

另外,自己新建的环境都没有问题,可以实时同步,就客户的环境不能同步!!!

分析过程

1、用以下这些命令查询分析并没找到错误的原因

这里其实有个很奇怪的现象,就是send exta showtrans查询出来的是数据库未提交的事务,但是gv$transaction视图却查不出来结果,找不到该事务XID:

2、数据库的告警日志有如下输出:

怀疑是否是这个问题,于是配置:

仍然不行。参考:https://docs.oracle.com/database/121/ARPLS/d_cap_a.htm#ARPLS306

3、考虑到之前用的docker环境可以,于是对比一下2个库的差异,发现字符集和redo大小不一样。我之前用的环境是AL32UTF8字符集,而客户环境是ZHS16GBK环境,

仍然不行。

一般来说,字符集不一样,只会导致数据传输过来后是乱码,不会导致进程hang住。

另外,由于好的环境用的是50M的redo日志,而客户环境是300M的redo日志,于是修改redo日志为50M

还是不行。

4、怀疑是否和rac有关,另外,客户的环境也打了最新的PSU,为了验证这个问题,所以特意新建了2个库,redo为500m,字符集为ZHS16GBK,但是测试都没问题:

那说明是客户数据库本身的问题。难道是客户的表太多导致的吗,客户端表才2万张表左右,其实不多!!!!

5、怀疑是否有特殊的触发器导致。经过查询,没有特殊的触发器!!!

6、使用OGG巡检报告

参考:使用OGG 21.3远程实时互相同步Oracle 11.2.0.4(双主) – 小麦苗DBA宝典 (dbaup.com)

https://www.dbaup.com/ogg-for-oraclejiankangxunjianguanfangjiaoben.html

这里其实有个特殊现象,就是跑脚本的时候,总是卡住,巡检结果根本出不来,于是分析脚本,找到卡住的位置如下:

于是拿到数据库中查询视图DBA_GOLDENGATE_SUPPORT_MODE,发现根本不能出结果。

DBA_GOLDENGATE_SUPPORT_MODE displays information about the level of Oracle GoldenGate capture process support for the tables in the database. 捕获进程对数据库中表的支持级别的信息

ColumnDatatypeNULLDescription
OWNERVARCHAR2(128)Table owner
OBJECT_NAMEVARCHAR2(128)Table name
SUPPORT_MODEVARCHAR2(6)Capture process support level for the table:FULL - A capture process can capture changes made to all of the columns in the tableID KEY - A capture process can capture changes made to the key columns and any other columns in the table supported by the capture process, except for LOB, LONG, LONG RAW, and XMLType columns.INTERNAL - A capture process cannot capture changes made to any columns in the table because the table is secondary to a user-created table and is updated implicitly when changes are made to the user-created table. Such tables include mapping tables for index-organized tables, storage tables for nested tables, materialized view logs, secondary objects associated with domain indexes, and temporary tables.NONE - A capture process cannot capture changes made to any columns in the table because the table is not supported for replication.

PreviousNext

参考:https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/DBA_GOLDENGATE_SUPPORT_MODE.html

找到这个视图的定义,发现视图dba_goldengate_support_mode基于视图DBA_XSTREAM_OUT_SUPPORT_MODE:

本人提供Oracle(OCP、OCM)、MySQL(OCP)、PostgreSQL(PGCA、PGCE、PGCM)等数据库的培训和考证业务,私聊QQ646634621或微信dbaup66,谢谢!
AiDBA后续精彩内容已被站长无情隐藏,请输入验证码解锁本文!
验证码:
获取验证码: 请先关注本站微信公众号,然后回复“验证码”,获取验证码。在微信里搜索“AiDBA”或者“dbaup6”或者微信扫描右侧二维码都可以关注本站微信公众号。

标签:

Avatar photo

小麦苗

学习或考证,均可联系麦老师,请加微信db_bao或QQ646634621

您可能还喜欢...

发表回复