Goldengate Configure Oracle to MySQL

Source: Internet
Author: User
Tags mysql mysql code


Oracle to MySQL test has always been a garbled problem can not be resolved, and then exchanges with colleagues, he said that Oracle use OGG 11g version, MySQL use ogg 10g version can solve the garbled problem, at first I still doubt, because I think the new version is not good, Could the old version solve the problem? Holding to try the attitude, did a test, the success of the experiment, the relevant situation recorded



MySQL parameter configuration (CAT/ETC/MY.CNF):



[Client]



Default-character-set = GBK



[Mysqld]



lower_case_table_names=1– table names are case-insensitive (the province is not able to due to case problems in the REPL process)



Character-set-server = GBK



Table/Column encoding: All GBK



Note:



1. Since MySQL is the target, there is no requirement for Log-bin/binlog_format parameters



2, through the above settings to ensure that all MySQL related coding is GBK



System encoding Configuration (cat/etc/sysconfig/i18n):



Source



Lang= "ZH_CN. GBK "



Supported= "Zh_CN.GBK:zh_CN:zh"



Sysfont= "Latarcyrheb-sun16″



Target



Lang= "ZH_CN. GBK "



Sysfont= "Latarcyrheb-sun16″



Note: Yes, the system code is the same as the MySQL code



Ogg configuration process:



SOURCE End:



Add extract Ext-all,tranlog,begin Now



ADD Exttrail/opt/ogg/dirdat/extract/al, extract Ext-all



Edit params Ext-all



Extract Ext-all



Setenv (Nls_lang =american_america. ZHS16GBK)



UserID Is1ogg,password Passw0rd



Exttrail/opt/ogg/dirdat/extract/al



Discardfile/opt/ogg/discard/ext-all.txt, append, megabytes 100



DDL INCLUDE mapped optype alter objname ECP. tab*



See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/MySQL/



TABLE ecp.*;



Add EXTRACT P-air, Exttrailsource/opt/ogg/dirdat/extract/al, BEGIN now



Add Rmttrail/opt/ogg/dirdat/rl Extract P-air



Edit params P-air



Extract P-air



Setenv (Nls_lang =american_america. ZHS16GBK)



UserID Is1ogg,password Passw0rd



Rmthost 192.168.1.4,mgrport 7809,tcpbufsize 100000,tcpflushbytes 300000



Rmttrail/opt/ogg/dirdat/rl



Discardfile/opt/ogg/discard/p-air.txt, append, megabytes 100



TABLE ecp.*;



Target End:



Add Replicat repl, Exttrail/opt/ogg/dirdat/rl,nodbcheckpoint



Edit params Repl



Replicat REPL



Dboptions HOST 127.0.0.1, Connectionport 3306



Targetdb Ecp,userid Root,password Xifenfei



Assumetargetdefs



Reperror Default,discard



Discardfile/tmp/mysql.dsc,append,megabytes 100



MAP ECP. Tab_uum_dept, TARGET ecp.tab_uum_dept;



MAP ECP. Tab_uum_dept_leader, TARGET Ecp.tab_uum_dept_leader;


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.