溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

OGG 簡單DML同步

發(fā)布時間:2020-08-07 04:22:46 來源:ITPUB博客 閱讀:124 作者:Davis_itpub 欄目:關(guān)系型數(shù)據(jù)庫
<strong>一、源端進程配置</strong><br /> 添加本地抓取進程exta<br /> add ext exta, tranlog, begin now<br /> 指定抓取日志到指定路徑下<br /> add exttrail /u01/app/oracle/product/ogg_src/dirdat/ra,ext exta , MEGABYTES 20<br /> <br /> <br /> 添加遠程投遞dpea進程<br /> ADD EXTRACT dpea, EXTTRAILSOURCE /u01/app/oracle/product/ogg_src/dirdat/ra<br /> 指定dpea進程投遞目的地<br /> add rmttrail /u01/app/oracle/product/ogg/dirdat/ra,ext dpea, MEGABYTES 20<br /> <br /> <strong>二、expdp/impdp 進行表初始化</strong><br /> 源端:<br /> 查看當前SCN號<br /> select current_scn from v$database;<br /> <br /> <br /> CURRENT_SCN<br /> -----------<br /> &nbsp; &nbsp; 1081055<br /> <br /> <br /> 以sys用戶登錄,并授權(quán)讀寫給ogg<br /> create directory ogg_dir as '/u01/app/oracle/product/ogg_src/ogg_dir';<br /> grant read,write on directory ogg_dir to ogg;<br /> <br /> <br /> 導(dǎo)出數(shù)據(jù)<br /> expdp &nbsp;ogg/ogg directory=ogg_dir dumpfile=ogg1.dmp &nbsp;logfile=oggtest1.log tables=ogg.oggtest1 flashback_scn=1081055<br /> <br /> <br /> 目標端:<br /> 以sys用戶登錄,并授權(quán)讀寫給ogg<br /> create directory ogg_dir as '/u01/app/oracle/product/ogg/ogg_dir';<br /> grant read,write on directory ogg_dir to ogg;<br /> <br /> <br /> 導(dǎo)入數(shù)據(jù)<br /> &nbsp;impdp ogg/ogg directory=ogg_dir dumpfile=ogg1.dmp logfile=oggtest1.log tables=oggtest1 table_exists_action=replace;<br /> <br /> <strong>三、目標端進程配置</strong><br /> 添加repa進程<br /> add rep repa, exttrail /u01/app/oracle/product/ogg/dirdat/ra, nodbcheckpoint<br /> <br /> 編輯repa進程<br /> edit param repa<br /> replicat repa<br /> userid ogg, password ogg<br /> reperror default,abend<br /> discardfile /u01/app/oracle/product/ogg/dirrpt/repa.dsc,append, megabytes 10<br /> assumetargetdefs<br /> dynamicresolution<br /> map ogg.oggtest1, target ogg.oggtest1 ;<br /> <br /> 啟用repa進程解析trail文件<br /> start &nbsp;repa aftercsn 1085091<br /> <br /> 本例中是利用了OGG中dump進程將數(shù)據(jù)投遞到目的端,也可以直接使用extact進程投遞到目的端,但是各有利弊。<br />
向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI