OGG异常处理和操作说明

一.配置处理:

(1)OGG-00664 Oracle GoldenGate Capture for Oracle, EORA.prm: OCI Error beginning session (status = 12705-ORA-12705: Cannot access NLS data files or invalid environment specified).
  • 说明:源端抽取进程参数设置错误:

setenv (NLS_LANG="AMERICAN_AMERICA.ZHS16GBK")

  • 修复方案:查询数据库NLS_LANG参数,并修改
// 查询语句
SQL> select userenv('language') from dual;

USERENV('LANGUAGE')
----------------------------------------------------
SIMPLIFIED CHINESE_CHINA.ZHS16GBK
(2)OGG-02091 Oracle GoldenGate Capture for Oracle, EORA.prm: Operation not supported because enable_goldengate_replication is not set to true.
  • 说明:Oracle的ENABLE_GOLDENGATE_REPLICATION参数未启用

  • 修复方案:修改ORACLE的ENABLE_GOLDENGATE_REPLICATION为TRUE

SQL> ALTER SYSTEM SET ENABLE_GOLDENGATE_REPLICATION = TRUE;
(3)OGG-00717 Oracle GoldenGate Capture for Oracle, EORA.prm: Found unsupported in-memory undo record in sequence 34619, at RBA 2301400, with SCN 0.239272029 (239272029) ... Minimum supplemental logging must be enabled to prevent data loss.
  • 说明:读取ORACLE日志异常:1.当前归档模式未启动;2.设置的同步时间未找到日志文件

  • 修复方案1:检查当前归档模式是否开启,开启当前归档模式

// 查看数据库当前归档模式
CMD> sqlplus "/as sysdba"
SQL> select log_mode from v$database;
LOG_MODE
------------
NOARCHIVELOG

// 开启归档模式
SQL> archive log list;
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database archivelog;
SQL> alter database open;
  • 修复方案2:查看日志记录,修改同步时间
    日志记录参考路径:E:\app\Administrator\fast_recovery_area\orcl
// 查询日志记录
SQ> select name from v$archived_log;
E:\APP\ADMINISTRATOR\FAST_RECOVERY_AREA\ORCL\ARCHIVELOG\2019_06_27\O1_MF_1_13129_GK85XW88_.ARC

// 修改同步时间
GGSCI> add extract eora,tranlog,begin now //从当前时间开始同步
GGSCI> add extract eora, tranlog,begin 2019-06-27 13:00:00 //指定时间点开始同步
(4)OGG-01031 Oracle GoldenGate Capture for Oracle, PUMP_SO.prm: There is a problem in network communication, a remote file problem, encryption keys for target and source do not match (if using ENCRYPT) or an unknown error. (Reply received is Output file E:\ogg\ogg_tsg\et000000 in the GolenGate installation directory is not allowed.).
  • 说明:投递进程参数路径设置错误

rmttrail E:\ogg\ogg_tsg

  • 修复方案:检查投递进程配置并修改错误路径

extract Pump_so
Userid ADLIB3OGG,password 密码
rmthost 202.202.82.98, mgrport 7905
rmttrail E:\ogg\ogg_tsg\dirdat\et
Table ADLIB3_XZ.*;

GGSCI >edit params pump_so
GGSCI >ADD RMTTRAIL E:\ogg\ogg_tsg\dirdat\et, EXTRACT PUMP_SO
(5)director监控工具无法连接ogg实例:

Oracle GoldenGate 之 Director 监控工具安装和邮箱报警
注意:ogg进程需启动

  • 检查端口是否能 telnet通
cmd >telnet 202.202.82.98 7900
  • 修复方案1(端口不能 telnet 通):查看防火墙是否开放端口


    OGG异常处理和操作说明_第1张图片
    01.png
  • 修复方案2(端口能 telnet 通):在ogg的GLOBALS文件中添加参数:_DISABLEFIX21427144

MGRSERVNAME OGGMGR_TSG
GGSCHEMA oggggs
checkpointtable oggggs.checkpoint
ALLOWOUTPUTDIR E:\ogg\ogg_tsg\dirdat
_DISABLEFIX21427144

// 编辑GLOBALS文件
GGSCI> edit params ./GLOBALS
(6) Oracle GoldenGate Capture for Oracle, PUMP_SO.prm: The trail 'D:\ogg\dirdat\et' is not assigned to extract 'PUMP_SO'. Assign the trail to the extract with the command "ADD EXTTRAIL/RMTTRAIL D:\ogg\dirdat\et, EXTRACT PUMP_SO".
  • 说明:未执行 "ADD EXTTRAIL/RMTTRAIL D:\ogg\dirdat\et, EXTRACT PUMP_SO" 或执行错误
  • 解决方案:根据提示执行:ADD EXTTRAIL/RMTTRAIL D:\ogg\dirdat\et, EXTRACT PUMP_SO
    注意:EXTTRAIL/RMTTRAIL 选一执行即可
GGSCI > ADD RMTTRAIL D:\ogg\dirdat\et, EXTRACT PUMP_SO

二·.运行中异常处理:

(1) Oracle GoldenGate Capture for Oracle, ejwinit.prm: No viable key columns found for table JW_USER.ZFTAL_XTGL_ZFTZB.
  • 说明:目标端找不到表 JW_USER.ZFTAL_XTGL_ZFTZB

  • 修复方案1:在源端查询该表结构,在目标端中添加该表,重启进程

GGSCI > start repl
  • 修复方案2:在源端的投递进程和目标端的应用进程忽略该表

源端投递进程添加参数:
tableexclude JW_USER.ZFTAL_XTGL_ZFTZB

目标端应用进程添加参数:
mapexclude JW_USER.ZFTAL_XTGL_ZFTZB

  • 设置完成后重启进程即可

注意:此处的用户名以源端为准,即源端数据库名为JW_USER,目标端为JWUSER,、应使用JW_USER

(2)Oracle GoldenGate Capture for Oracle, eora.prm: The redo record indicates data loss on object 140,382.
  • 说明:暂未发现影响,ogg进程正常
  • 参考:
    https://maazanjum.com/2013/12/15/ogg-01973-the-redo-record-indicates-data-loss-on-object-objectid/
    https://community.oracle.com/message/13905235?tstart=0
  • 处理记录:

尝试执行:select owner,object_name,object_type from dba_objects where object_id=140269; 查找记录。
目标端:无记录
源端:无记录

(3)Oracle GoldenGate Delivery for Oracle, REPL_JW.prm: Encountered an update where all key columns for target table JWUSER.JW_JCGL_GYSXXB are not present.
  • 说明:表没有主键,ogg也无法将全部字段当做唯一键进行更新
  • 修复方案:在应用进程中添加参数,手动指定唯一键

map JW_USER.JW_JCGL_GYSXXB, target JWUSER.JW_JCGL_GYSXXB, keycols (GYSXX_ID,GYSM);
注意结尾的分号

参考:
replicat repl_jw
setenv (NLS_LANG="AMERICAN_AMERICA.AL32UTF8")
assumetargetdefs
reperror default, discard
ddl INCLUDE MAPPED
ddloptions report
applynoopupdates
discardfile ./dirrpt/jw_repl.dsc, append, megabytes 2000
userid oggggs,password 密码
REPLACEBADCHAR SKIP
mapexclude JW_USER."JW_CJ_XYYJTJCXXB"
map JW_USER.JW_XMGL_JXXMBMSZZB, target JWUSER.JW_XMGL_JXXMBMSZZB, keycols (JXXMLBDM,JXXMKZBZ);
map JW_USER.JW_JCGL_GYSXXB, target JWUSER.JW_JCGL_GYSXXB, keycols (GYSXX_ID,GYSM);
map JW_USER.JW_PK_KBXXZDXSKZB, target JWUSER.JW_PK_KBXXZDXSKZB, keycols (KBZL,ZDM);
MAP JW_USER., target JWUSER.;

  • 设置完成后重启进程即可
(4)Oracle GoldenGate Capture for Oracle, PUMP_SO.prm: TCP/IP error 10054 (远程主机强迫关闭了一个现有的连接。), endpoint: 202.202.82.98:7905.
  • 说明:源端pump_so无法连接目标端应用进程
  • 修复方案:
    1.检查网络状态
    2.检查目标端ogg进程状态
    3.修复网络或ogg进程异常
    4.重启进程
(5) Oracle GoldenGate Capture for Oracle, pump_so.prm: Receive TCP params error: TCP/IP error 104 (Connection reset by peer), endpoint: 202.202.82.98:7911.
  • 说明:网络原因造成,正常情况下,会自动重启
  • 修复方案:
    1.检查网络状态
    2.重启进程
(6) Oracle GoldenGate Capture for Oracle, EORA.prm: Object with object number 318496 is compressed. Table compression is not supported.
  • 说明:源端表压缩,暂未发现影响,ogg进程停止后自动重启成功后无异常
(7) OGG01098 - Oracle GoldenGate Capture for Oracle, EORA.prm: Could not flush "H:\ogg\oggoracle\dirdat\et000190" (error 112, ).
  • 说明:检查源端磁盘空间

Oracle案例06—— OGG-01098 Could not flush "./dirdat/e1000004383" (error 28, No space left on device)

Oracle GoldenGate OGG 报错汇总

你可能感兴趣的:(OGG异常处理和操作说明)