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
- 數據重要
- 此時須要從備份中恢復相應的歸檔文件