GoldenGate表異構的解決方法
首先必須建立一個資料定義檔案,本例中,資料定義檔案在源端生成1. 建立一個引數檔案 edit param rep1.defs defsfile ./dirdef/rep1.defs userid ggs, password ggs scott.*;
注意分號不可少,否則資料定義檔案生成的時候會出錯2. 使用GoldenGate工具gendef 生成資料定義檔案 這個工具是一個EXE檔案,所以必須在命令列下執行 c:\ggs>defgen paramfile rep1.defs
*********************************************************************** Oracle GoldenGate Table Definition Generator for Oracle Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230 Windows x64 (optimized), Oracle on Apr 23 2012 05:48:41
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
Starting at 2013-07-10 16:10:03***********************************************************************
Operating System Version:Microsoft Windows 7 , on x64Version 6.1 (Build 7601: Service Pack 1)
Process id: 4704
************************************************************************* Running with the following parameters *************************************************************************defsfile ./dirdef/rep1.defs
Source Context : SourceModule : [defgen.main] SourceID : [defgen/defgen.c] SourceFunction : [create_defgen_file] SourceLine : [795] ThreadBacktrace : [8] elements : [c:\ggs\gglog.dll(??1CContextItem@@UEAA@XZ+0x313f) [0x00000001801075AF]] : [c:\ggs\gglog.dll(?_MSG_ERR_STARTUP_FILE_EXISTS@@YAPEAVCMessage@@PEAVCSourceContext@@PEBD1W4MessageDisposition@CMessageFactory@@@Z+0xda) [0x000000018001F47A]] : [c:\ggs\defgen.exe(<_msg_err_startup_file_exists>PEAVCMessage@@PEAVCSourceContext@@PEBD1W4MessageDisposition@CMessageFactory@@@Z+0xda) [0x0000000140004418]] : [c:\ggs\defgen.exe(<_msg_err_startup_file_exists>PEAVCMessage@@PEAVCSourceContext@@PEBD1W4MessageDisposition@CMessageFactory@@@Z+0xda) [0x00000001400057B0]] : [c:\ggs\defgen.exe(<_msg_err_startup_file_exists>PEAVCMessage@@PEAVCSourceContext@@PEBD1W4MessageDisposition@CMessageFactory@@@Z+0xda) [0x00000001400064F6]] : [c:\ggs\defgen.exe(CommonLexerNewSSD+0x2be0) [0x000000014007F1B0]] : [C:\Windows\system32\kernel32.dll(BaseThreadInitThunk+0xd) [0x00000000773D652D]] : [C:\Windows\SYSTEM32\ntdll.dll(RtlUserThreadStart+0x21) [0x000000007750C521]]
2013-07-10 16:10:03 ERROR OGG-00037 DEFSFILE file ./dirdef/rep1.defs already exists.
2013-07-10 16:10:03 ERROR OGG-01668 PROCESS ABENDING.
c:\ggs>defgen paramfile rep1.defs
*********************************************************************** Oracle GoldenGate Table Definition Generator for Oracle Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230 Windows x64 (optimized), Oracle 11g on Apr 23 2012 05:48:41
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
Starting at 2013-07-10 16:11:51***********************************************************************
Operating System Version:Microsoft Windows 7 , on x64Version 6.1 (Build 7601: Service Pack 1)
Process id: 6384
************************************************************************* Running with the following parameters *************************************************************************defsfile ./dirdef/rep1.defsuserid ggs, password ***table scott.*;Expanding wildcard scott.*:
Retrieving definition for SCOTT.BONUS
2013-07-10 16:12:03 WARNING OGG-00869 No unique key is defined for table 'BONUS'. All viable columns will be used to represent the key, but may not guaranteeuniqueness. KEYCOLS may be used to define the key.Retrieving definition for SCOTT.DEMORetrieving definition for SCOTT.DEPTRetrieving definition for SCOTT.EMPRetrieving definition for SCOTT.SALGRADE
2013-07-10 16:12:03 WARNING OGG-00869 No unique key is defined for table 'SALGRADE'. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.Retrieving definition for SCOTT.TEST_DDL
2013-07-10 16:12:03 WARNING OGG-00869 No unique key is defined for table 'TEST_DDL'. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
Definitions generated for 6 tables in ./dirdef/rep1.defs
檔案生成之後,將檔案複製到目標端的ggs安裝目錄下的dirdef目錄,檔名是rep1.defs
在目標端的replicat程式組引數檔案中加入一行map scott.demo, target scott.demo , colmap(usedefaults, salary=wages);
其中wages是源端的列名
源端demo表定義:
CREATE TABLE "SCOTT"."DEMO" ("ID" NUMBER, "ENAME" VARCHAR2(10 BYTE), "WAGES"NUMBER, PRIMARY KEY ("ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ENABLE, SUPPLEMENTAL LOG GROUP "GGS_74569" ("ID") ALWAYS )
目標端demo表定義:
CREATE TABLE "SCOTT"."DEMO" ("ID" NUMBER, "ENAME" VARCHAR2(10 BYTE), "SALARY"NUMBER, PRIMARY KEY ("ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ENABLE, SUPPLEMENTAL LOG GROUP "GGS_74569" ("ID") ALWAYS )
啟動extract, replicat程式,測試結果OK。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/196700/viewspace-766403/,如需轉載,請註明出處,否則將追究法律責任。
請登入後發表評論
登入
全部評論
PEAVCMessage@@PEAVCSourceContext@@PEBD1W4MessageDisposition@CMessageFactory@@@Z+
0xda) [0x0000000140004418]]
: [c:\ggs\defgen.exe(<_msg_err_startup_file_exists>
PEAVCMessage@@PEAVCSourceContext@@PEBD1W4MessageDisposition@CMessageFactory@@@Z+
0xda) [0x00000001400057B0]]
: [c:\ggs\defgen.exe(<_msg_err_startup_file_exists>
PEAVCMessage@@PEAVCSourceContext@@PEBD1W4MessageDisposition@CMessageFactory@@@Z+
0xda) [0x00000001400064F6]]
: [c:\ggs\defgen.exe(CommonLexerNewSSD+0x2be0) [0x0000
00014007F1B0]]
: [C:\Windows\system32\kernel32.dll(BaseThreadInitThun
k+0xd) [0x00000000773D652D]]
: [C:\Windows\SYSTEM32\ntdll.dll(RtlUserThreadStart+0x
21) [0x000000007750C521]]
2013-07-10 16:10:03 ERROR OGG-00037 DEFSFILE file ./dirdef/rep1.defs already
exists.
2013-07-10 16:10:03 ERROR OGG-01668 PROCESS ABENDING.
c:\ggs>defgen paramfile rep1.defs
***********************************************************************
Oracle GoldenGate Table Definition Generator for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
Windows x64 (optimized), Oracle 11g on Apr 23 2012 05:48:41
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
Starting at 2013-07-10 16:11:51
***********************************************************************
Operating System Version:
Microsoft Windows 7 , on x64
Version 6.1 (Build 7601: Service Pack 1)
Process id: 6384
***********************************************************************
** Running with the following parameters **
***********************************************************************
defsfile ./dirdef/rep1.defs
userid ggs, password ***
table scott.*;
Expanding wildcard scott.*:
Retrieving definition for SCOTT.BONUS
2013-07-10 16:12:03 WARNING OGG-00869 No unique key is defined for table 'BONU
S'. All viable columns will be used to represent the key, but may not guarantee
uniqueness. KEYCOLS may be used to define the key.
Retrieving definition for SCOTT.DEMO
Retrieving definition for SCOTT.DEPT
Retrieving definition for SCOTT.EMP
Retrieving definition for SCOTT.SALGRADE
2013-07-10 16:12:03 WARNING OGG-00869 No unique key is defined for table 'SALG
RADE'. All viable columns will be used to represent the key, but may not guarant
ee uniqueness. KEYCOLS may be used to define the key.
Retrieving definition for SCOTT.TEST_DDL
2013-07-10 16:12:03 WARNING OGG-00869 No unique key is defined for table 'TEST
_DDL'. All viable columns will be used to represent the key, but may not guarant
ee uniqueness. KEYCOLS may be used to define the key.
Definitions generated for 6 tables in ./dirdef/rep1.defs
檔案生成之後,將檔案複製到目標端的ggs安裝目錄下的dirdef目錄,
檔名是rep1.defs
在目標端的replicat程式組引數檔案中加入一行
map scott.demo, target scott.demo , colmap(usedefaults, salary=wages);
其中wages是源端的列名
源端demo表定義:
CREATE TABLE "SCOTT"."DEMO"
("ID" NUMBER,
"ENAME" VARCHAR2(10 BYTE),
"WAGES"NUMBER,
PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ENABLE,
SUPPLEMENTAL LOG GROUP "GGS_74569" ("ID") ALWAYS
)
目標端demo表定義:
CREATE TABLE "SCOTT"."DEMO"
("ID" NUMBER,
"ENAME" VARCHAR2(10 BYTE),
"SALARY"NUMBER,
PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ENABLE,
SUPPLEMENTAL LOG GROUP "GGS_74569" ("ID") ALWAYS
)
啟動extract, replicat程式,測試結果OK。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/196700/viewspace-766403/,如需轉載,請註明出處,否則將追究法律責任。
請登入後發表評論
登入
全部評論
相關文章
- Goldengate異構 mysql——>oraclGoMySql
- goldengate 故障及解決方法彙總Go
- Goldengate異構oracle->mysql搭建GoOracleMySql
- javaWeb常見異常的解決方法JavaWeb
- GoldenGate在異構環境下的複製Go
- LOAD異常中止導致表無法訪問的解決方法
- TOM關於變異表的解決檔案
- 表空間滿的解決方法
- SQL SERVER 不能修改表結構、列型別 解決方法SQLServer型別
- Oracle GoldenGate 異構平臺同步(Mysql到Oracle)OracleGoMySql
- Oracle GoldenGate 針對表沒有主鍵或唯一索引的解決方案OracleGo索引
- Oracle GoldenGate 針對表沒有主鍵或唯一索引的解決方案OracleGo索引
- 異機恢復RMAN-05517解決方法
- Oracle資料表死鎖的解決方法Oracle
- undo表空間不能回收的解決方法
- UNDO表空間不足解決方法
- ORACLE 鎖表的解決方法及查詢引起鎖表SQL語句方法OracleSQL
- PHP防止表單重複提交的解決方法PHP
- 臨時表空間過大的解決方法
- dual系統表被刪除的解決方法
- 臨時表空間已滿的解決方法
- 異構資料的SQL一站式解決方案SQL
- 關於goldengate 對源表和目的表的表結構一致的定義Go
- 關於java中空指標異常的原因及解決方法Java指標
- system表空間爆滿解決方法
- Spring10種常見異常解決方法Spring
- hibernate open session in view 丟擲異常解決方法SessionView
- oracle變異表觸發器相關問題解決Oracle觸發器
- 比較兩個的表結構差異
- ORACLE 中undo表空間爆滿的解決方法Oracle
- Google打不開的解決方法和IP地址表Go
- Java常出現的異常解決方法總結(不斷更新)Java
- goldengate同步中更改資料表結構維護Go
- 企業架構師、解決方案架構師和技術架構師的異同 - Briqi架構
- Mysqldump 匯出表結構異常MySql
- Logo(圖片)作為報表水印的解決方法Go
- Dynamics CRM 圖表超出最大記錄限制的解決方法
- MySQL innodb_table_stats表不存在的解決方法MySql