goldengate ddl 配置說明
GoldenGate的DDL同步只支援兩邊一致的資料庫、單向複製,限制條件較多(如不能進行欄位對映、轉換等),所以實際應用價值不是很大。
基本配置步驟為:
(1)關閉ORACLE的回收站功能。
(2)選擇一個資料庫schema存放支援DDL的GoldenGate物件,執行相應建立指令碼。
(3)編輯globals引數檔案。
(4)修改extl和repl的配置檔案
具體步驟:
(1). 關閉資料庫回收站:
SQL>alter system set recyclebin=off scope=both;
(2). 編輯globals引數檔案:
GGSCI>edit param ./globals
新增以下內容後儲存:
GGSCHEMA ddw --標明支援DDL的GG物件存放在哪個schema下
(3). 執行建立指令碼:
首先需要命令列進入GG安裝目錄下,然後再執行sqlplus執行指令碼,如果不進入目錄下指令碼執行會報錯(由於指令碼中子指令碼巢狀使用相對路徑的問題所造成)。
SQL>@marker_setup.sql --提示輸入目標schema
SQL>@ddl_setup.sql --提示輸入目標schema,輸入initialsetup最後輸入yes
SQL>@role_setup.sql
SQL>grant GGS_GGSUSER_ROLE to ddw; --不進行該步賦權後面起程式會報錯
SQL>@ddl_enable.sql --使觸發器生效
(4). 最後修改提取程式和複製程式的配置檔案,分別加入ddl include all屬性。repl必須指定assumetargetdefs屬性,這表明只有兩邊資料庫結構一致的情況下才可以啟用DDL複製。另外,開啟DDL同步不能再只對映單表了,對整個模式下的物件都有效。
在實際測試中,由於我在同一個資料庫中進行對映,而且對映表結構不一致,導致程式報了一系列的錯誤。這個時候需要把透過指令碼建立的GG物件中的資料清空,安裝目錄下只提供了清除物件的指令碼,可以如下操作:首先要求把所有的GG程式停掉,包括mgr程式
SQL>@ddl_disable.sql --首先使DDL觸發器失效
SQL>@ddl_remove.sql
SQL>@marker_remove.sql
role_setup.sql沒有對應的清除指令碼,但是這塊不影響配置資訊的清除
然後重新再建立指令碼。
1) Configure Extract with DDL capture:
EXTRACT ggs_ext
USERID gg01, PASSWORD gg01
EXTTRAIL ./dirdat/et
-- Capture DDL for tables only, but not changes to indexes or sequences in the same schema because they wouldn’t hurt the DML replication.
DDL INCLUDE MAPPED, OBJTYPE 'TABLE'
DDLOPTIONS REPORT, ADDTRANDATA
TABLE gg01.customers;
TABLE gg01.products;
goldengate支援上的oracle物件:
Supported Oracle objects and operations for DDL replication
All Oracle GoldenGate topology configurations are supported for Oracle DDL replication.
Active-active (bi-directional) replication of Oracle DDL is supported between two (and only
two) databases that contain identical metadata.
Oracle GoldenGate supports all DDL operations up to 2 MB in size on the following objects:
clusters
functions
indexes
packages
procedure
tables
tablespaces
roles
sequences
synonyms
triggers
types
views
materialized views
users
OGG DDL功能限制:
1.需關閉回收站功能:
Oracle recycle bin
Because of a known issue in Oracle 10g, the Oracle recycle bin must be turned off to
support Oracle GoldenGate DDL replication. If the recycle bin is enabled, the Oracle
GoldenGate DDL trigger session receives implicit recycle bin DDL operations that cause
the trigger to fail.
When you install the Oracle GoldenGate DDL support objects, the script prompts you to
permit it to purge the recycle bin, and then it will do so automatically if permission is
granted. However, you still must disable the recycle bin manually.
To turn off the recycle bin:
● Oracle 10g Release 2 and later: Set the RECYCLEBIN initialization parameter to OFF.
● Oracle 10g Release 1: Set the _RECYCLEBIN initialization parameter to FALSE.
Consult the database documentation for the correct syntax.
2.DDL語句長度小於2MB
DDL statement length
Oracle GoldenGate measures the length of a DDL statement in bytes, not in characters.
The supported length is approximately 2 MB, allowing for some internal overhead that can
vary in size depending on the name of the affected object and its DDL type, among other
characteristics. If the DDL is longer than the supported size, Extract will issue a warning
and ignore the DDL operation.
3.系統配置:
1).源表結構和目標表結構必須一致
2).複製段必須使用ASSUMETARGETDEFS引數。如果使用 SOURCEDEFS引數(表結構不一致使用此引數),則將導致複製端程式ABENDED。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29468144/viewspace-1079270/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【GoldenGate】Oracle GoldenGate(三) DDL同步配置GoOracle
- goldengate配置DDL複製Go
- 配置GoldenGate啟動DDL支援同步DDL操作Go
- GoldenGate 配置文件,裡面有引數說明Go
- GoldenGate配置(三)之DDL複製配置Go
- oracle goldengate 配置DML&DDL實驗OracleGo
- GoldenGate HANDLECOLLISIONS引數使用說明Go
- goldengate常用函式使用說明Go函式
- Goldengate引數簡要說明Go
- 配置支援DML和DDL操作同步的GoldenGateGo
- GoldenGate BR(bounded Recovery)簡單說明Go
- goldengate常用命令使用說明Go
- GoldenGate單向複製配置(支援DDL複製)Go
- Kafka配置說明Kafka
- FTP配置說明FTP
- goldengate 單向DDLGo
- Spring配置說明Spring
- GOLDENGATE 清除DDL環境Go
- pureftpd安裝配置簡明說明 (轉)FTP
- elasticsearch.yml 配置說明Elasticsearch
- Elasticsearch 引數配置說明Elasticsearch
- kafka 引數配置說明Kafka
- webwork.properties配置說明Web
- 交換機配置命令說明
- kettle MongoDB Output 配置說明MongoDB
- Oracle GoldenGate系統之----相關引數說明OracleGo
- Oracle 11g DDL_LOCK_TIMEOUT引數說明Oracle
- Redis應用配置項說明Redis
- Nginx的配置檔案說明Nginx
- Docker 的配置檔案說明Docker
- Nginx負載均衡配置說明Nginx負載
- Apache 配置檔案說明(轉)Apache
- Nginx的gzip配置引數說明Nginx
- nginx 詳解 – 詳細配置說明Nginx
- nginx 詳解 - 詳細配置說明Nginx
- VNC安裝配置詳細說明VNC
- 【轉載】UEditor前端配置項說明前端
- Nginx配置檔案詳細說明Nginx