ogg同步mysql(mariadb5.5)数据到oracle

之前同步oracle到mariadb5.5,mariadb到mariadb,ogg版本都是12.1,比较顺利。这次将mariadb5.5的数据同步到oracle,因为源使用的ogg12.1,而目标使用的ogg11.2,两个不同版本,所以搞了很长时间。因为是从高版本到低版本,需要在抽取进程和传递进程中分别添加:format release 11.2,如下:

view param odce1
extract odce1
sourcedb [email protected]:3306 userid ogg password ogg
exttrail /home/goldengate/dirdat/d2,format release 11.2
discardfile  /home/goldengate/dirrpt/odce1.dsc,append
TranLogOptions AltLogDest /home/mariadb/data/binlogs.index
table o2m-uc.GMDZQY;

view param odcp1
extract odcp1
passthru
sourcedb [email protected]:3306 userid ogg password ogg
rmthost  10.128.11.91,mgrport 7809,compress
rmttrail  /home/oracle/goldengate/dirdat/p2,format release 11.2
dynamicresolution
numfiles 3000
table o2m-uc.GMDZQY;

 否则报错: 
  

ERROR   OGG-01332  Oracle GoldenGate Delivery for Oracle, odcr1.prm:  File /home/oracle/goldengate/dirdat/p2000000, with compatibility level 4, is not compatible with the current software version's compatibility level of 3. Modify the file writer's parameter file to generate the appropriate format using the FORMAT LEVEL 3 option.
ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, odcr1.prm:  PROCESS ABENDING.

三个进程都启动后,测试报错:

ERROR   OGG-00303  Oracle GoldenGate Delivery for Oracle, odcr1.prm:  Problem at line 37.  Expecting file, table, or record definition: TimeZone: US/Eastern.
ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, odcr1.prm:  PROCESS ABENDING.
网上找到解决方案

1、Use a defgen paramfile with NOEXTATTR option(即:./defgen NOEXTATTR paramfile ./dirprm/defgen.prm)
2、generate definition file with the same OGG version as the OGG target site version.
因为方法1比较方便,就偷懒使用方法1,于是报错解决。数据可以传输到目标目录,但不应用SQL。于是采用方法2,单独下载ogg11.2formysql来生成def文件,最后解决。

说明:服务器上开启11.2的mgr进程时,注意其端口。


你可能感兴趣的:(Oracle,OGG,Mysql)