您好,登錄后才能下訂單哦!
本篇文章給大家主要講的是關(guān)于GoldenGate幫助MySQL到Oracle的數(shù)據(jù)實(shí)現(xiàn)實(shí)時(shí)同步的內(nèi)容,感興趣的話就一起來(lái)看看這篇文章吧,相信看完GoldenGate幫助MySQL到Oracle的數(shù)據(jù)實(shí)現(xiàn)實(shí)時(shí)同步對(duì)大家多少有點(diǎn)參考價(jià)值吧。
step 1: 配置mysql
修改配置文件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
添加數(shù)據(jù)庫(kù)用戶ggs,具有DBA權(quán)限
step 2: 在mysql云服務(wù)器上安裝配置GoldenGate
創(chuàng)建mgr.prm
PORT 7809
DYNAMICPORTLIST 7840-7914
STARTUPVALIDATIONDELAY 5
PURGEOLDEXTRACTS C:\ogg\dirdat\*, USECHECKPOINTS, MINKEEPDAYS 7
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
創(chuàng)建抽取進(jìn)程參數(shù)ext1.prm
--ext1.prm
EXTRACT ext1
SOURCEDB test@localhost:3306, USERID ggs, PASSWORD 123
DISCARDROLLOVER ON FRIDAY
DISCARDFILE C:\ogg\dirrpt\ext1.dsc, APPEND, MEGABYTES 1024
WARNLONGTRANS 2h, CHECKINTERVAL 3m
REPORTCOUNT EVERY 30 MINUTES, RATE
EXTTRAIL C:\ogg\dirdat\ex
DYNAMICRESOLUTION
NUMFILES 5000
TABLE test.test1;
添加抽取進(jìn)程ext1
ADD EXTRACT ext1, tranlog, begin now
ADD EXTTRAIL C:\ogg\dirdat\ex, EXTRACT ext1, megabytes 100
創(chuàng)建傳播進(jìn)程參數(shù)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.*;
添加抽取進(jìn)程dp1
ADD EXTRACT dp1, EXTTRAILSOURCE C:\ogg\dirdat\ex
ADD RMTTRAIL d:\ogg\dirdat\ex, EXTRACT dp1, MEGABYTES 100
step 3: 配置defgen
創(chuàng)建defgen參數(shù)
--defgen.prm
defsfile C:\ogg\dirdef\defgen.prm
sourcedb test@localhost:3306, userid ggs,password 123
table test.test1;
生成defgen文件
defgen paramfile C:\ogg\dirprm\defgen.prm
將C:\ogg\dirdef目錄下的文件defgen.prm拷貝到目標(biāo)端的相應(yīng)目錄下,即目錄.\dirdef下。
step 4: Oracle環(huán)境準(zhǔn)備
創(chuàng)建數(shù)據(jù)庫(kù)用戶
create tablespace ggs datafile '......' size 200m;
create user ggs identified by 123 default tablespace ggs;
grant dba to ggs;
step 5: 在Oracle云服務(wù)器安裝配置GoldenGate
創(chuàng)建mgr參數(shù)
--mgr.prm
PORT 7809
DYNAMICPORTLIST 7840-7914
STARTUPVALIDATIONDELAY 5
PURGEOLDEXTRACTS d:\ogg\dirdat\*, USECHECKPOINTS, MINKEEPDAYS 7
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
創(chuàng)建復(fù)制進(jìn)程參數(shù)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;
添加復(fù)制進(jìn)程
dblogin userid ggs password 123
add checkpointtable chkpnttab
add replicat rep1,exttrail D:\ogg\dirdat\ex, checkpointtable chkpnttab
以上關(guān)于GoldenGate幫助MySQL到Oracle的數(shù)據(jù)實(shí)現(xiàn)實(shí)時(shí)同步詳細(xì)內(nèi)容,對(duì)大家有幫助嗎?如果想要了解更多相關(guān),可以繼續(xù)關(guān)注我們的行業(yè)資訊板塊。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。