天天看點

OGG-01332 ogg高版本向低版本傳輸

Neo君遇到的ogg版本問題,在ggserr.log中的錯誤資訊如下:

2018-10-12 09:55:10  ERROR   OGG-01332  Oracle GoldenGate Delivery, orcl2.prm:  File /u01/golden122011/dirdat/o2000000000, with compatibility le
vel 6, is not compatible with the current software version's compatibility level of 5. Modify the file writer's parameter file to generate the a
ppropriate format using the FORMAT LEVEL 5 option.      

大概能了解到是版本問題,使用./ggsci -v檢視版本資訊,源端:

Oracle GoldenGate Command Interpreter for Oracle
Version 12.3.0.1.2 OGGCORE_12.3.0.1.0_PLATFORMS_171208.0005_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec  8 2017 21:13:00

Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.      

目标端:

Oracle GoldenGate Command Interpreter
Version 12.2.0.1.160419 OGGCORE_12.2.0.1.0OGGBP_PLATFORMS_160430.1401
Linux, x64, 64bit (optimized), Generic on Apr 30 2016 16:21:34

Copyright (C) 1995, 2016, Oracle and/or its affiliates. All rights reserved.      

可以看出版本差異:高版本向低版本傳輸

參考文章:https://blog.csdn.net/msdnchina/article/details/51910797

在源端修改,extract程序trail檔案參數,加上目标版本資訊

>./ggsci
>edit param orcl2
....
rmttrail /u01/golden122011/dirdat/o2,format release 12.2
...      

然後start orcl2,結果報錯了..

2018-10-12T10:31:24.749+0800  ERROR   OGG-01232  Oracle GoldenGate Capture for Oracle, orcl2.prm:  Receive TCP params error: TCP/IP error 104 (C
onnection reset by peer), endpoint: xxxx:7819.      

原因是指定版本後,不能再寫入用一個trail檔案,需要讓源端程式復原,然後在目标端生成新的檔案。解決方案:

alter extract orcl2, etrollover      

目标端也需要進行相應的修改:先停止,讓它讀取生成的新trail檔案。其中 EXTSEQNO抽取檔案号,填寫在dirdat目錄下orcl2抽取程序生成的新的檔案的号。

>stop rep2
>ALTER REPLICAT rep2,EXTSEQNO 1, EXTRBA 0
>start  rep2 NOFILTERDUPTRANSACTIONS
>info rep2      

然後啟動成功。

OGG