GoldenGate表異構的解決方法
首先必須建立一個資料定義檔案,本例中,資料定義檔案在源端生成1. 建立一個引數檔案 edit param rep1.defs defsfile ./dirdef/rep1.defs userid ggs, password ggs table 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 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: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/29819001/viewspace-1672254/,如需轉載,請註明出處,否則將追究法律責任。
上一篇:
RAC環境下配置OGG同步
請登入後發表評論
登入
全部評論
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/29819001/viewspace-1672254/,如需轉載,請註明出處,否則將追究法律責任。
上一篇:
RAC環境下配置OGG同步
請登入後發表評論
登入
全部評論
相關文章
- Oracle GoldenGate 針對表沒有主鍵或唯一索引的解決方案OracleGo索引
- GoldenGate異種資料庫之間的複製Go資料庫
- 異構資料的SQL一站式解決方案SQL
- java.net.SocketTimeoutException: Read timed out異常解決方法JavaException
- Logo(圖片)作為報表水印的解決方法Go
- 瞭解GoldenGate Replicat的HANDLECOLLISIONS引數Go
- Java常出現的異常解決方法總結(不斷更新)Java
- 企業架構師、解決方案架構師和技術架構師的異同 - Briqi架構
- Dynamics CRM 圖表超出最大記錄限制的解決方法
- Mysqldump 匯出表結構異常MySql
- TabError的解決方法Error
- Ionic異常及解決
- SpringBoot-java.lang.IllegalArgumentException: Not a managed type異常問題解決方法Spring BootJavaException
- Spring 異常關鍵字 no matching editors or conversion strategy found 解決方法Spring
- 一種自平衡解決資料傾斜的分表方法
- 關於SpringMVC的HttpMediaTypeNotSupportedException異常解決SpringMVCHTTPException
- asp.net iis7預設文件錯誤異常的解決方法ASP.NET
- Oracle GoldenGate常用引數詳解OracleGo
- 三種方法解決docker構建失敗(alpine)Docker
- SpringCloud BeanCurrentlyInCreationException 異常解決方案SpringGCCloudBeanException
- win10qq安全元件異常怎麼修復_win10qq安全元件異常的解決方法Win10元件
- SpringMVC註解和非註解(xml)的方法的異同點SpringMVCXML
- 跨越異構鴻溝,Redis 遷移同步過程中的挑戰與解決方案Redis
- RxJava 異常時堆疊顯示不正確?解決方法都在這裡RxJava
- spring1.2+hibernate3.0+junit3.8+jdk1.4的單元測試異常解決方法SpringJDK
- dns劫持怎麼解決 dns劫持的解決方法DNS
- elmentui表單重置初始值問題與解決方法UI
- 線性表的結構詳解
- RocketMQ的invokeSync call timeout異常的解決辦法MQ
- Oracle Net Configuration Assistant failed異常的解決方案OracleAI
- Redis快取的主要異常及解決方案Redis快取
- 遇到問題的解決方法
- No bean named 'cacheManager' availablej 異常解決BeanAI
- GoldenGate的基本配置流程Go
- goldengate的sqlexec測試GoSQL
- 只匯入表結構及索引的方法索引
- OGG 表結構變化導致同步異常
- win10系統中流放之路經常彈出異常錯誤的解決方法Win10