Real-time synchronization of MySQL-to-Oracle data using Goldengate

Source: Internet
Author: User


Step 1: Configure MySQL
Modifying a configuration file My.ini
#for goldengate
Log-bin = "C:/mysql/logbin/logbin.log"
Binlog-format = ROW
Log-bin-index = "C:\mysql\logindex"
binlog_cache_size=32m
max_binlog_cache_size=512m
max_binlog_size=512m

Add database user GGs with DBA authority

Step 2: Install the configuration on the MySQL server goldengate

Create MGR.PRM
PORT 7809
Dynamicportlist 7840-7914
Startupvalidationdelay 5
Purgeoldextracts c:\ogg\dirdat\*, usecheckpoints, Minkeepdays 7
Lagreporthours 1
Laginfominutes 30
Lagcriticalminutes 45

Create extraction process Parameters EXT1.PRM
--ext1.prm
EXTRACT Ext1
Sourcedb [email protected]: 3306, USERID GGs, PASSWORD 123
Discardrollover on FRIDAY
Discardfile C:\OGG\DIRRPT\EXT1.DSC, APPEND, megabytes 1024
Warnlongtrans 2h, Checkinterval 3m
Reportcount every MINUTES, rate
Exttrail C:\ogg\dirdat\ex
Dynamicresolution
Numfiles 5000
TABLE Test.test1;

Add Extraction Process Ext1
ADD EXTRACT ext1, Tranlog, begin now
ADD exttrail C:\ogg\dirrpt\ex, EXTRACT ext1, megabytes 100

Create propagation process Parameters DP1.PRM
--dp1.prm
EXTRACT DP1
Rmthost 172.27.35.28, Mgrport 7809,compress
Rmttrail D:\ogg\dirdat\ex
PASSTHRU
Numfiles 5000
Dynamicresolution
TABLE test.*;

Add Extraction Process DP1
ADD EXTRACT DP1, Exttrailsource C:\ogg\dirdat\ex
ADD rmttrail D:\ogg\dirdat\ex, EXTRACT DP1, megabytes 100

Step 3: Configure Defgen
Creating the Defgen parameter
--defgen.prm
Defsfile C:\OGG\DIRDEF\DEFGEN.PRM
Sourcedb [email protected]: 3306, userid Ggs,password 123
Table Test.test1;

Generate Defgen File
Defgen Paramfile C:\OGG\DIRPRM\DEFGEN.PRM

Copy the file DEFGEN.PRM in the C:\ogg\dirdef directory to the appropriate directory on the target side, which is the directory. \dirdef.

Step 4:oracle Environment Preparation
Create a database user
Create tablespace ggs datafile ' ... ' size 200m;
Create user GGs identified by 123 default Tablespace GGs;
Grant DBA to GGs;


Step 5: Install the configuration on the Oracle server Goldengate
Creating the MGR Parameter
--mgr.prm
PORT 7809
Dynamicportlist 7840-7914
Startupvalidationdelay 5
Purgeoldextracts d:\ogg\dirdat\*, usecheckpoints, Minkeepdays 7
Lagreporthours 1
Laginfominutes 30
Lagcriticalminutes 45

Create replication process Parameters REP1.PRM
--rep1.prm
Replicat REP1
Sourcedefs D:\OGG\DIRDEF\DEFGEN.PRM
UserID Ggs,password GGs
Reperror Default,discard
Discardfile D:\ogg\dirrpt\rep1.dsc,append,megabytes 50
Dynamicresolution
Map Test.test1, Target test.test1;

Add replication process
dblogin userid GGs Password 123
Add Checkpointtable Chkpnttab
Add Replicat rep1,exttrail D:\ogg\dirdat\ex, checkpointtable chkpnttab

This article is from the "cheney.yu" blog, make sure to keep this source http://cheneyyu.blog.51cto.com/173219/1551683

Real-time synchronization of MySQL-to-Oracle data using Goldengate

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.