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
然后啟動成功。
