Oracle technology uses goldengate synchronous MySQL

Source: Internet
Author: User
Tags lowercase mysql table name mysql database linux

One, the source side

Add extract Extl,vam,begin Now

ADD exttrail F:oggmysqldirdatrl, EXTRACT EXTL

Edit params EXTL

Extract EXTL

Sourcedb Test@localhost:3306,userid Root,password Xifenfei

Exttrail F:oggmysqldirdatrl

Dynamicresolution

Gettruncates

Table test.t_1;

Add EXTRACT pump1, Exttrailsource F:oggmysqldirdatrl, BEGIN now

Add Rmttrail/ogg/mysql/dirdat/rl Extract PUMP1

Edit params PUMP1

Extract PUMP1

Rmthost 192.168.1.111,mgrport 7808

Rmttrail/ogg/mysql/dirdat/rl

PassThru

Gettruncates

Table test.t_1;

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

Two, Target side

Edit params./globals

Dblogin sourcedb Test@localhost:3306,userid Root,password Xifenfei

Checkpointtable Ogg.chkpoint

ADD checkpointtable Ogg.chkpoint

Add Replicat repl exttrail/ogg/mysql/dirdat/rl,begin now,checkpointtable ogg.chkpoint

Edit params Repl

Replicat REPL

Dboptions HOST 127.0.0.1, Connectionport 3306

Targetdb Test,userid Root,password Xifenfei

Assumetargetdefs

Reperror Default,discard

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

Gettruncates

Map TEST. T_1, Target "test.t_1";

Iii. description

This example is the MySQL sync to Linux in win

There is a point to note:

1, add extract Extl,vam,begin now unlike Oracle Tranlog

2. Note the problem of Schema.tablename case in each parameter

1 win without distinction, all use lowercase will automatically convert to uppercase

2 in the replicate parameter, because the map is obtained from the data pump in win, the schema.tablename behind the map needs to capitalize

3 in the replicate parameter, because the table is Linux in the corresponding database name and table name (mysql is stored in file form, generally lowercase), so the map after the schema.tablename need lowercase + double quotes, to prevent uppercase

3, attention to MySQL database coding

Iv. Differences with Oracle

1, Login

Dblogin sourcedb Dbname@localhost:3306,userid Root,password Xifenfei

2, extract access to MySQL

Sourcedb Dbname@localhost:3306,userid Root,password Xifenfei

3, replicat access to MySQL

Dboptions HOST 127.0.0.1, Connectionport 3306

Targetdb Dbname,userid Root,password Xifenfei

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.