OGG-00446 分析与解决
Table of Contents
1 00446
OGG 的一些错误编号,包含了不少种不一样的缘由。00446 就是这样的一种,不一样的缘由有不一样的提示。本文包含两种:
-
Missing filename opening checkpoint file
-
could not find archived log
下面看分析与解决方法。css
1.1 Missing filename opening checkpoint file
1.1.1 错误信息
2019-07-02T23:26:17.998+0800 ERROR OGG-00446 Oracle GoldenGate Delivery, xmsys.prm: Missing filename opening checkpoint file. 2019-07-02T23:26:17.999+0800 ERROR OGG-01668 Oracle GoldenGate Delivery, xmsys.prm: PROCESS ABENDING.
1.1.2 分析
出现此错误,缘由是参数配置与命令不匹配。好比from file方式的数据应用进程,若是使用ggsci命令start命令 来启动, 则会出现这种错误。下面是两则安全,根本缘由都是命令与参数配置不匹配,一种是初始化,一种是实时 应用。html
- 案例1->初始化
-
参数配置 如下配置为一例 ogg for kafka 的 From File 方式初始化应用进程的配置。 java
SPECIALRUN -- 此行为重点 END RUNTIME SETENV(nls_lang="AMERICAN_AMERICA.ZHS16GBK") targetdb libfile libggjava.so set property=dirprm/xmins.props EXTFILE dirdat/ii reportcount every 1 minutes , rate grouptransops 10000
-
启动命令python
start initsp
-
日志sql
......... 2019-07-02T23:26:15.409+0800 INFO OGG-01360 Oracle GoldenGate Delivery, xmsys.prm: REPLICAT is running in Special Run mode. 2019-07-02T23:26:15.615+0800 INFO OGG-15052 Oracle GoldenGate Delivery, xmsys.prm: Using Java class path: ggjava/ggjava.jar:ggjava/resources/lib/optional/log4j-api-2.9.1.jar:ggjava/resources/lib/optional/log4j-core-2.9.1.jar:ggjava/resources/lib/optional/log4j-slf4j-impl-2.9.1.jar. 2019-07-02T23:26:17.988+0800 INFO OGG-01815 Oracle GoldenGate Delivery, xmsys.prm: Virtual Memory Facilities for: COM anon alloc: mmap(MAP_ANON) anon free: munmap file alloc: mmap(MAP_SHARED) file free: munmap target directories: /home/ogg/dirtmp. 2019-07-02T23:26:17.998+0800 ERROR OGG-00446 Oracle GoldenGate Delivery, xmsys.prm: Missing filename opening checkpoint file. 2019-07-02T23:26:17.999+0800 ERROR OGG-01668 Oracle GoldenGate Delivery, xmsys.prm: PROCESS ABENDING.
-
解决 经过操做系统命令 replicat 执行初始化:shell
$OGG_HOME/replicat paramfile $OGG_HOME/dirprm/xmsys.prm
-
- 案例2->实时抽取
-
参数配置 api
passthru rmthost 192.168.153.129, mgrport 7809 rmttrail /u02/ggs/dirdat/td gettruncates table scott.*; sequence scott.*;
-
分析 第一行应为:sass
extract test
-
1.2 could not find archived log
1.2.1 错误信息
在ggserr.log 中发现以下错误:安全
2019-05-31t10:56:53.629+0800 error ogg-00446 oracle goldengate capture for oracle, extxmdev.prm: could not find archived log for sequence 2649 thread 1 under default destinations sql <select name from v$archived_log where sequence# = :ora_seq_no and thread# = :ora_thread and resetlogs_id = :ora_resetlog_id and archived = 'yes' and deleted = 'no' and name not like '+%' and standby_dest = 'no' >, error retrieving redo file name for sequence 2649, archived = 1, use_alternate = 0not able to establish initial position for sequence 2649, rba 13816848. 2019-05-31t10:56:53.641+0800 error ogg-01668 oracle goldengate capture for oracle, extxmdev.prm: process abending.
1.2.2 分析
从错误信息提示来看,是归档日志找不到引发的中断。经查看归档日志确实不存在。 已被物理删除。且没有备份。ruby
- 数据不重要
-
此时能够修改extract 的起始值,跳过缺失的归档文件,这在测试和开发环境 中应用较多。 首先查看可用归档:
select sequence# ,first_change#, next_change# ,deleted,applied,status from v$archived_log; sequence# first_change# next_change# del applied s ---------- ------------- ------------ --- --------- - 3759 16360310 16401138 yes no a 3760 16401138 16419033 no no a
从上面的查询结果来看,3759号归档已被删除,最新可用归档是3760. 对应最先的 scn号是16401138. 将extract 进程的scn 值调整至16401138:
alter extrace extxmdev, scn 16401138 start ext extxmdev
- 数据重要
- 此时须要从备份中恢复相应的归档文件