GoldenGate Supplemental Log Data
源端Oracle表結構:
[id] [numeric](18, 0) NOT NULL,
[full_name] [varchar](300) NULL,
[wages] [numeric](18, 4) NULL,
[first_name] [varchar](200) NULL,
[last_name] [varchar](200) NULL,
PRIMARY KEY CLUSTERED
(
[id] ASC
)
源端extract配置:
GGSCI (chenyj-WorkPC) 7> view param oraext1
extract oraext1
userid ggs, password ggs
GETTRUNCATES
exttrail D:\ggora-ms\ggsora\dirdat\oa
table scott.customer;
table scott.myemps;
GGSCI (chenyj-WorkPC) 8> view param pumpdb
EXTRACT pumpdb
USERID ggs, PASSWORD ggs
GETTRUNCATES
RMTHOST 127.0.0.1, MGRPORT 7700
RMTTRAIL D:\ggora-ms\ggsms\dirdat\or
table scott.customer;
table scott.myemps;
目標端replicat配置:
GGSCI (chenyj-WorkPC) 9> view param msrep1
REPLICAT MSREP1
targetdb ggs_nc
GETTRUNCATES
APPLYNOOPUPDATES
SOURCEDEFS dirdef/source.def
MAP scott.customer, TARGET dbo.customer;
map scott.myemps, target dbo.myemps,
COLMAP (USEDEFAULTS,
WAGES = @COMPUTE(SALARY * 12)
FULL_NAME = @STRCAT(LAST_NAME,",",FIRST_NAME));
源端插入資料然後更新:
insert into myemps(id,first_name,last_name,salary) values(2, 'A', 'B', 100000);
commit;
update myemps set first_name = 'CCCC' where id = 2;
commit;
同步之後, SQLServer裡看到的full_name應該是B,CCCC,而不應該是B,A。
在OTN發帖:https://forums.oracle.com/thread/2561302
得到的提示是因為supplemental log的設定問題,更新last_name時,如果要使目標端的full_name的結果正確,應該同時將first_name與last_name寫入redo log.
通過在oracle裡執行:
SQL> alter table scott.myemps add supplemental log data(all) columns;
表已更改。
再做相同的測試,發現full_name結果正確了。
There are several types of supplemental logging:
- Minimal
- Primary Key
- Unique Key
- Foreign Key
- All
- Procedural Replication
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-766663/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle設定日誌引數-ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;OracleDatabase
- 附加日誌(supplemental log)
- oracle設定supplemental logOracle
- Oracle 補充日誌(supplemental log)Oracle
- supplemental logging總結
- Oracle supplemental log的兩種型別Oracle型別
- nologging、force logging、supplemental log的理解
- 為什麼要Supplemental Log(追加日誌)
- 深入認識Oracle Supplemental loggingOracle
- 10g Supplemental Log 設定與取消
- Supplemental log VS add trandata on OGG for oracleOracle
- Oracle10g Supplemental Log(追加日誌) [final]Oracle
- 關於oracle10g Supplemental Log (追加日誌)Oracle
- Oracle Data Integrator和GoldenGate整合OracleGo
- Logical Standby中的supplemental logging和rely disable constraintAI
- Oracle10g Supplemental Log(追加日誌) -2 [final]Oracle
- GoldenGate<二> configure data pumpGo
- GoldenGate Logdump基本使用Go
- GGS ERROR 190 No Minimum Supplemental Logging Is EnabledError
- goldengate for big data 12.3釋出Go
- goldengate for big data 12.2.0.1.1新增功能Go
- Step by Step Data Replication Using Oracle GoldenGateOracleGo
- GoldenGate replication using a data definition file and DEFGEN utilityGo
- 關於Oracle GoldenGate 引數TRANLOGOPTIONS altarchivelogdestOracleGoHive
- Oracle GoldenGate for Big Data 12.2.0.1的新特性OracleGo
- ERROR OGG-00730 No minimum supplemental logging is enabledError
- GoldenGate的Logdump工具使用簡介Go
- Apress Expert Oracle GoldenGate - Topologies and Use CasesOracleGo
- Logical DBA, DA Data Architect
- 使用goldengate error log檢視錯誤資訊GoError
- Oracle goldengate 12c 新特性之完美支援Active Data GuardOracleGo
- Oracle GoldenGate 資料同步初始化最佳實戰(Data Pump)OracleGo
- goldengate trail檔案內容檢視工具logdumpGoAI
- How To Replicate Data from Oracle to Postgres Using GoldenGate (Doc ID 1544137.1OracleGo
- GoldenGate<三> configure data-distribution(1對多複製)Go
- 【譯】Using .NET for Apache Spark to Analyze Log DataApacheSpark
- 瞭解PowerDesigner的Logical Data Model
- ADC and DAC Analog Filters for Data ConversionFilter