GoldenGate MSSQL Oracle的主鍵問題導致的錯誤

abstractcyj發表於2013-07-16
2013-07-16 11:14:01  WARNING OGG-00869  Oracle GoldenGate Delivery for Oracle, MSREP.prm:  No unique key is defined for table 'EMP'. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.
2013-07-16 11:14:01  WARNING OGG-03504  Oracle GoldenGate Delivery for Oracle, MSREP.prm:  NLS_LANG character set US7ASCII on the target is different from the source database character set ZHS16GBK. Replication may not be valid if the source data has an incompatible character for the target NLS_LANG character set.
2013-07-16 11:14:01  INFO    OGG-01021  Oracle GoldenGate Delivery for Oracle, MSREP.prm:  Command received from GGSCI: STATS.
2013-07-16 11:18:31  INFO    OGG-01021  Oracle GoldenGate Delivery for Oracle, MSREP.prm:  Command received from GGSCI: STATS.
2013-07-16 11:18:31  WARNING OGG-01431  Oracle GoldenGate Delivery for Oracle, MSREP.prm:  Aborted grouped transaction on 'GGS.EMP', Mapping error.
2013-07-16 11:18:31  WARNING OGG-01003  Oracle GoldenGate Delivery for Oracle, MSREP.prm:  Repositioning to rba 1044 in seqno 0.
2013-07-16 11:18:31  WARNING OGG-01151  Oracle GoldenGate Delivery for Oracle, MSREP.prm:  Error mapping from dbo.emp to GGS.EMP.
2013-07-16 11:18:31  WARNING OGG-01003  Oracle GoldenGate Delivery for Oracle, MSREP.prm:  Repositioning to rba 1044 in seqno 0.
2013-07-16 11:18:31  ERROR   OGG-01296  Oracle GoldenGate Delivery for Oracle, MSREP.prm:  Error mapping from dbo.emp to GGS.EMP.
2013-07-16 11:18:31  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, MSREP.prm:  PROCESS ABENDING.

採取的解決方式也很簡單,因MSSQL的emp表已經有了主鍵,所以在oracle資料庫裡定義好主鍵就解決了問題

也可以採用KEYCOLS引數定義target的主鍵

REPLICAT MSREP
USERID ggs@orcl, PASSWORD ggs
SOURCEDEFS dirdef/emp.def
MAP dbo.emp, TARGET ggs.emp,keycols(id);



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-766373/,如需轉載,請註明出處,否則將追究法律責任。

相關文章