操作系統(tǒng)版本:
數(shù)據(jù)庫版本:
OGG版本:
Oracle GoldenGate Command Interpreter for SQL Server
Version 12.1.2.1.10 21604177 OGGCORE_12.1.2.1.0OGGBP_PLATFORMS_150902.1337
Windows x64 (optimized), Microsoft SQL Server on Sep 2
Operating system character set identified as GBK.
目標(biāo)端:
目標(biāo)端操作系統(tǒng)內(nèi)核版本:
數(shù)據(jù)庫版本:
OGG版本:
Oracle GoldenGate Command Interpreter for Oracle
Version 12.1.2.1.10 21604177 OGGCORE_12.1.2.1.0OGGBP_PLATFORMS_150902.1337_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Sep 2
Operating system character set identified as UTF-8.
目標(biāo)庫sqlserver全部備庫
中間庫sqlserver全庫恢復(fù)
中間庫通過ogg原有的初始化功能初始化此表數(shù)據(jù)到目標(biāo)庫
源庫直接初始化數(shù)據(jù)到目標(biāo)庫
目標(biāo)庫搭建復(fù)制進(jìn)程基于初始化時間點之前啟動復(fù)制進(jìn)程
MGR進(jìn)程:
▼▼▼
GGSCI (crmprddb) 2> view params mgr
PORT 7809
PURGEOLDEXTRACTS dirdatcm* USECHECKPOINTS, MINKEEPDAYS 3
AUTORESTART EXTRACT *, WAITMINUTES 6, RETRIES 5
LAGREPORTMINUTES 5
LAGCRITICALMINUTES 15
投遞進(jìn)程DPCRM:
▼▼▼
GGSCI (crmprddb) 3> view params DPCRM
EXTRACT dpcrm
DISCARDFILE dirrptdpcrm.dsc, PURGE
PASSTHRU
RMTHOST 192.168.***.***, MGRPORT 7809
RMTTRAIL dirdat/tr
TABLE *.*;
抽取進(jìn)程EXTCRM:
▼▼▼
GGSCI (crmprddb) 6> view param EXTCRM
EXTRACT extcrm
SOURCEDB ggsadmin, USERID 用戶名, PASSWORD 密碼
TRANLOGOPTIONS MANAGESECONDARYTRUNCATIONPOINT
DYNAMICRESOLUTION
REPORTCOUNT EVERY 30 MINUTES, RATE
DISCARDFILE dirrptextcrm.dsc, PURGE
EXTTRAIL dirdatcm
GETUPDATEBEFORES
NOCOMPRESSUPDATES
NOCOMPRESSDELETES
TABLE dbo.ACCOUNTBASE; --投遞的表
TABLE MetaDataSchema.ENTITY;
dblogin sourcedb test, userid test, password test
add trandata dbo. test
--查看附加日志是否添加
info trandata dbo. test
edit params EXTCRM
table dbo. test;
stop *
start *
4. 源端修改defgen配置文件,重新生成defgen文件,并傳輸?shù)侥繕?biāo)端
vi ./dirprm/defgen.prm
table dbo. test;
重新生產(chǎn)定義文件scp到目標(biāo)端
defgen paramfile d:oggdirprmdefgen.prm
scp ./dirdef/crm.def oracle@192.168.***.***:/oracle/ogg/dirdef/
stop *
start *
initcrm1:源端初始化進(jìn)程名
intcrm1:目標(biāo)端初始化進(jìn)程名
▼▼▼
GGSCI> ADD EXTRACT initcrm1, SOURCEISTABLE
GGSCI> edit params initcrm1
EXTRACT initcrm1
SOURCEDB test, USERID test, PASSWORD test
RMTHOST 192.168.***.***, MGRPORT 7809
RMTTASK REPLICAT, GROUP intcrm1
table dbo.test;
▼▼▼
GGSCI> ADD replicat intcrm1, specialrun
GGSCI> edit params intcrm1
SETENV (ORACLE_HOME = "/oracle/product/11.2.0" )
SETENV (ORACLE_SID = "odsdb")
SETENV (NLS_LANG = "American_America.AL32UTF8")
REPLICAT intcrm1
USERID ggsadmin, PASSWORD ggsadmin
--BULKLOAD
SOURCEDEFS /oracle/ogg/dirdef/crm.def
MAP dbo.test, TARGET bi_ods. test
查看初始化進(jìn)程執(zhí)行情況
info * , task
開啟初始化進(jìn)程后,通過info * , task查看同步狀態(tài),初始化進(jìn)程同步完成后會自動斷開
ADD REPLICAT CRMTEST, EXTTRAIL dirdat/tr,BEGIN 2021-05-07 17:00:00
添加主鍵沖突異常處理參數(shù):
reperror (-1, discard) 此參數(shù)針對ora-00001主鍵沖突報錯,直接跳過
▼▼▼
GGSCI> dblogin userid test,password test
GGSCI> ADD REPLICAT CRMTEST, EXTTRAIL dirdat/tr,BEGIN 2021-05-07 17:00:00
GGSCI> edit params CRMTEST
INCLUDE dirprm/upd.mac
SETENV (ORACLE_HOME = "/oracle/product/11.2.0")
SETENV (ORACLE_SID = "odsdb")
SETENV (NLS_LANG = "American_America.AL32UTF8")
REPLICAT CRMTEST
USERID ggsadmin, PASSWORD ggsadmin
DISCARDFILE ./dircrd/CRMTEST.dsc, PURGE
SOURCEDEFS /oracle/ogg/dirdef/crm.def
SQLEXEC "ALTER SESSION SET COMMIT_WAIT = NOWAIT"
BATCHSQL
DBOPTIONS DEFERREFCONST
DBOPTIONS SUPPRESSTRIGGERS
ALLOWDUPTARGETMAP
reperror (-1, discard)
MAP dbo.test, TARGET bi_ods.test;
通過 info CRMTEST 查看進(jìn)程同步情況,當(dāng)進(jìn)程同步追上以后,刪除reperror (-1, discard)
參數(shù),至此基于時間的異構(gòu)數(shù)據(jù)庫ogg表同步配置完成。
更多精彩干貨分享
點擊下方名片關(guān)注
IT那活兒
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://m.specialneedsforspecialkids.com/yun/129878.html
OGG Integrated Native DDL簡單測試 img{ display:block; margin:0 auto !important; width:100%; } body{ width:75%;...
摘要:問題九庫控制文件擴(kuò)展報錯庫的擴(kuò)展報錯,用的是裸設(shè)備,和還是原來大小,主庫的沒有報錯,并且大小沒有變,求解釋。專家解答從報錯可以看出,控制文件從個塊擴(kuò)展到個塊時報錯,而裸設(shè)備最大只支持個塊,無法擴(kuò)展,可以嘗試將參數(shù)改小,避免控制文件報錯。 鏈接描述引言 近期我們在DBASK小程序新關(guān)聯(lián)了運維之美、高端存儲知識、一森咖記、運維咖啡吧等數(shù)據(jù)領(lǐng)域的公眾號,歡迎大家閱讀分享。 問答集萃 接下來,...
閱讀 1353·2023-01-11 13:20
閱讀 1699·2023-01-11 13:20
閱讀 1211·2023-01-11 13:20
閱讀 1902·2023-01-11 13:20
閱讀 4161·2023-01-11 13:20
閱讀 2751·2023-01-11 13:20
閱讀 1397·2023-01-11 13:20
閱讀 3664·2023-01-11 13:20