OGG-01332 File xxx with compatibility level 7, is not compatible with the current software version's compatibility level of 5(OGG高版本向低版本传输)
报错信息:OGG-01332 File /u01/app/ogg/dirdat/lt000000000, with compatibility level 7, is not compatible with the current software version's compatibility level of 5. Modify the file writer's parameter file to generate the appropriate format using the FORMAT LEVEL 5 option.
注意:我这边源端OGG是21.3,目标端OGG是12.2,不兼容,只能降低源端版本或升级目标端版本。
OGG-01416 File ./dirdat/lt000000001, with format RELEASE 19.1/21.1, does not match current format specification of RELEASE 12.2. Modify the parameter file to specify format RELEASE 19.1/21.1 or issue ETROLLOVER prior to restart.
关于在一套复制环境中使用不同版本OGG的问题:
1.源头OGG版本低,目的端OGG版本高,此种配置不需要做任何的额外改动.跟两端是相同OGG版本的同步是完全一样的参数设置.
2.源头OGG版本高,目的端OGG版本低,此种配置需要在源头的抽取进程和传输进程的参数文件中设置trailfile的格式(设置为跟目的端OGG版本一样的格式).
1 2 3 | EXTTRAIL <trail file>, FORMAT RELEASE 10.0 RMTTRAIL <trail file>, FORMAT RELEASE 10.0 |
注意:此处的10.0是目的端OGG的版本号.
3.源头的抽取进程和传输进程的参数文件中务必都要设置trailfile的格式.因为,仅仅依靠传输进程无法达到转换trailfile格式的目的.因为传输进程就是这么设计的:It must write trails in the same version it read them.
参考文章:
different versions of golden gate (ID 3570021)
Can OGG Version 11 Be Used to Pump/Move Trails Generated from Version 9 or 10? (文档 ID 1297283.1)
解决
遇到的ogg版本问题,在ggserr.log中的错误信息如下:
1 2 3 | 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查看版本信息,源端:
1 2 3 4 5 | 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. |
目标端:
1 2 3 4 5 | 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. |
可以看出版本差异:高版本向低版本传输
在源端修改,extract进程trail文件参数,加上目标版本信息
1 2 3 4 5 | >./ggsci >edit param orcl2 .... rmttrail /u01/golden122011/dirdat/o2,format release 12.2 ... |
然后start orcl2,结果报错了..
1 | ERROR OGG-01232 Oracle GoldenGate Capture for Oracle, orcl2.prm: Receive TCP params error: TCP/IP error 104 (Connection reset by peer), endpoint: xxxx:7819. |
原因是指定版本后,不能再写入用一个trail文件,需要让源端程序回滚,然后在目标端生成新的文件。解决方案:
1 | alter extract orcl2, etrollover |
目标端也需要进行相应的修改:先停止,让它读取生成的新trail文件。其中 EXTSEQNO抽取文件号,填写在dirdat目录下orcl2抽取进程生成的新的文件的号。
1 2 3 4 | stop rep2 ALTER REPLICAT rep2,EXTSEQNO 1, EXTRBA 0 start rep2 NOFILTERDUPTRANSACTIONS info rep2 |
然后启动成功。