Use GoldenGate to synchronize data from MySQL to Oracle in real time
Use GoldenGate to synchronize data from MySQL to Oracle in real time
Step 1: Configure mysql
Modify the configuration file my. ini
# For goldengate
Log-bin = "C:/mysql/logbin. log"
Binlog-format = ROW
Log-bin-index = "C: \ mysql \ logindex"
Binlog_cache_size = 32 m
Max_binlog_cache_size = 512 m
Max_binlog_size = 512 m
Add Database User ggs with DBA permission
Step 2: install and configure GoldenGate on the mysql server
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 parameter ext1.prm
-- Ext1.prm
EXTRACT ext1
SOURCEDB test @ localhost: 3306, USERID ggs, PASSWORD 123
Discardrolover ON FRIDAY
Discardfile c: \ ogg \ dirrpt \ ext1.dsc, APPEND, MEGABYTES 1024
WARNLONGTRANS 2 h, CHECKINTERVAL 3 m
Reportcount every 30 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 parameter 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
Create defgen Parameters
-- Defgen. prm
Defsfile C: \ ogg \ dirdef \ defgen. prm
Sourcedb test @ localhost: 3306, userid ggs, password 123
Table test. test1;
Generate the defgen File
Defgen paramfile C: \ ogg \ dirprm \ defgen. prm
Copy the file defgen. prm under the C: \ ogg \ dirdef directory to the target directory. \ dirdef.
Step 4: Prepare the Oracle environment
Create a database user
Create tablespace ggs datafile '... 'size 200 m;
Create user ggs identified by 123 default tablespace ggs;
Grant dba to ggs;
Step 5: install and configure GoldenGate on the Oracle server
Create mgr Parameters
-- Mgr. prm
PORT 7809
DYNAMICPORTLIST 7840-7914
STARTUPVALIDATIONDELAY 5
PURGEOLDEXTRACTS d: \ ogg \ dirdat \ *, USECHECKPOINTS, MINKEEPDAYS 7
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
Create a replication process parameter 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 a replication process
Dblogin userid ggs password 123
Add checkpointtable chkpnttab
Add replicat rep1, exttrail D: \ ogg \ dirdat \ ex, checkpointtable chkpnttab
Data synchronization between Oracle GoldenGate databases on Heterogeneous OS
GoldenGate synchronizes Oracle Data to GreenPlum
New Features of Oracle GoldenGate 12c Credential Store and USERIDALIAS
GoldenGate suspected BUG: info all cannot view extract
One-way Oracle-Oracle Replication Using the GoldenGate Data Pump