實施GG,遇到兩個錯誤,記錄備忘:
1. Cannot load ICU resource bundle ‘ggMessage’, error code 2 – No such file or directory
需要在ggs的HOME目錄下執行ggsci才OK,在其他位置執行會報錯,找不到檔案或是目錄
[oracle@Enmopri app]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1 OGGCORE_11.1.1_PLATFORMS_110421.2040
Linux, x64, 64bit (optimized), Oracle 11g on Apr 21 2011 22:42:14
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
GGSCI (Enmopri) 1> dblogin userid ggs,password oraclegg
Cannot load ICU resource bundle ‘ggMessage’, error code 2 – No such file or directory
Cannot load ICU resource bundle ‘ggMessage’, error code 2 – No such file or directory
Aborted
[oracle@Enmopri app]$ cd ggs/
[oracle@Enmopri ggs]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1 OGGCORE_11.1.1_PLATFORMS_110421.2040
Linux, x64, 64bit (optimized), Oracle 11g on Apr 21 2011 22:42:14
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
GGSCI (Enmopri) 1> dblogin userid ggs,password oraclegg
Successfully logged into database.
2.無法同步表
2011-05-20 09:04:54 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): start mgr.
2011-05-20 09:04:54 INFO OGG-00983 Oracle GoldenGate Manager for Oracle, mgr.prm: Manager started (port 7809).
2011-05-20 09:05:07 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): start rep1.
2011-05-20 09:05:07 INFO OGG-00963 Oracle GoldenGate Manager for Oracle, mgr.prm: Command received from GGSCI on host 127.0.0.1 (START REPLICAT REP1 ).
2011-05-20 09:05:07 INFO OGG-00975 Oracle GoldenGate Manager for Oracle, mgr.prm: REPLICAT REP1 starting.
2011-05-20 09:05:07 INFO OGG-00995 Oracle GoldenGate Delivery for Oracle, rep1.prm: REPLICAT REP1 starting.
2011-05-20 09:05:07 INFO OGG-00996 Oracle GoldenGate Delivery for Oracle, rep1.prm: REPLICAT REP1 started.
2011-05-20 09:05:07 ERROR OGG-00212 Oracle GoldenGate Delivery for Oracle, rep1.prm: Invalid option for MAP: ggs.*.
2011-05-20 09:05:07 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle, rep1.prm: PROCESS ABENDING.
根據提示,應該是rep1配置錯誤,檢視rep1
replicat rep1
userid ggs,password oraclegg
assumetargetdefs
reperror default,discard
discardfile /u01/app/ggs/discard/repsz.des,append megabytes 100
gettruncates
map ggs.*,target ggs.*;
貌似一切正常,根據網上提示,是一個空格導致的血案!
The error was due to a space missing between the comma (,) and TARGET (keyword) in the Replicat params file.
修改後再次測試,成功
2011-05-20 09:11:18 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): stop rep1.
2011-05-20 09:11:22 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): start rep1.
2011-05-20 09:11:22 INFO OGG-00963 Oracle GoldenGate Manager for Oracle, mgr.prm: Command received from GGSCI on host 127.0.0.1 (START REPLICAT REP1 ).
2011-05-20 09:11:22 INFO OGG-00975 Oracle GoldenGate Manager for Oracle, mgr.prm: REPLICAT REP1 starting.
2011-05-20 09:11:22 INFO OGG-00995 Oracle GoldenGate Delivery for Oracle, rep1.prm: REPLICAT REP1 starting.
2011-05-20 09:11:22 INFO OGG-00996 Oracle GoldenGate Delivery for Oracle, rep1.prm: REPLICAT REP1 started.
2011-05-20 09:11:31 WARNING OGG-00869 Oracle GoldenGate Delivery for Oracle, rep1.prm: No unique key is defined for table TEST. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.