Oracle Data Integrator和GoldenGate整合

先決條件
1. Oracle database 11g已安裝,2. Oracle GoldenGate 11g for Linux已安裝
3. Oracle Data Integrator已安裝在windows上
環境介紹
Oracle Linux 64 bit 6.4 (IP: 192.168.1.109), hosts both database and GoldenGate.Oracle Database: 11.2.0.3 64 bit
Oracle GoldenGate 11.2.1.0.1 for Linux 64 bit and Oracle 11g
OGG source directory: /home/oracle/ogg_src
OGG staging directory: /home/oracle/ogg
Source table: cust_dw_dev.src_city
Staging table: gg_demo_stage.city
ODI 11g installed on Windows 7 64bit – IP:
192.168.1.154, master and work repository have been created.
資料庫環境配置
For demonstration purposes, source, staging, target tables are in the same database.Source Schema and Table
Login 192.168.1.109 as oracle/oracle
sqlplus “/as sysdba”
create user cust_dw_dev identified by a123456;
grant dba to cust_dw_dev;
create user odi_tmp identified by a123456;
grant dba to odi_tmp;
connect cust_dw_dev@orcl;
執行Oracle官網上下載的ODI demo.zip包含的建表語句建立src_city表
Staging and Target Schema and Table
Connect “/as sysdba”;
create user gg_demo_staging identified by a123456;
grant dba to gg_demo_staging;
create user gg_demo_target identified by gg_demo_target;
grant dba to gg_demo_target;
connect gg_demo_staging/a123456@orcl;
create table gg_demo_staging.CITY (
CITY_ID NUMERIC(10) not null,
CITY VARCHAR(50),
REGION_ID NUMERIC(10),
POPULATION NUMERIC(10),
constraint PK_SRC_CITY primary key (CITY_ID)
);
Connect gg_demo_target/a123456@orcl;
create table gg_demo_target.CITY (
CITY_ID NUMERIC(10) not null,
CITY VARCHAR(50),
REGION_ID NUMERIC(10),
POPULATION NUMERIC(10),
constraint PK_SRC_CITY primary key (CITY_ID)
);
ODI配置
Physical Architecture
Start ODI Studio from Windows 7Connect to master and work repository.
Source
Topology tab ? Physical Architecture ? Oracle, right click and select New Data ServerEnter GG_SOURCE for Name
On JDBC tab, Enter:
oracle.jdbc.OracleDriver for JDBC Driver
jdbc:oracle:thin:@192.168.1.109:1521:orcl for JDBC Url
Click save and Test Connection.
Right GG_SOURCE and select New Physical Schema
Enter:
cust_dw_dev for Schema (Schema)
odi_tmp for Schema (Work Schema)
Click save and close.
Staging and Target
Follow the previous steps to create staging Data Server and Physical Schemas. Here, use gg_demo_staging as physical schema, gg_demo_target for target.Logical Architecture
Source
Topology tab ? Logical Architecture ? Oracle, right click and select New Logical Schema.Enter GG_SOURCE for Name
Select GG_ONE for Physical Schema for Global Context.
Staging and Target
Follow the same steps to create staging and target Logical Schema. Use appropriate names for staging and target.Model
Click Designer tab ? Models ? New Model. Enter “GG_SOURCE”, ”GG_STAGING”,”GG_TARGET” for source, staging and target schema, select “Oracle” for Technology, select Logical Schema respectively for source, staging and target.Right click each newly-created models and select Reverse Engineer, tables created from Database Step should show up in the list.
Right click CITY table from GG_STAGING, Changed Data Capture ? Add to CDC, click Yes on the pop-up box.
CDC Configuration
Go to Designer --> Projects --> Knowledge Modules, right click and select Import Knowledge Modules, from the pop-up window, select JKM Oracle to Oracle Consistent (OGG), and click OK.
Double click “GG_STAGING” model, select
Journalizing, and select Consistent Set for Journalizing Mode, JKM Oracle to
Oracle Consistent(OGG).
Enter the configuration as follows and save.

ODI will generation parameter and obey files for OGG extract, pump and replicat process based on above configuration, user is required to deploy parameter and obey files to OGG server.
Right click “GG_STAGING” --> Changed Data Capture --> Subscriber --> Subscribe, Enter ODI on the popup windows, click add and then save.
Right click “GG_STAGING” --> Changed Data Capture --> Start
Journal.
Deploy CDC Infrastructure
Source
Zip d:\ODIS_to_ODIT1 and upload to user oracle’s home directory in 192.168.1.109.Login 192.168.1.109 as oracle.
Unzip ODIS_to_ODIT1.
cp ~/ODIS_to_ODIT1/src/dirprm/* ~/ogg_src/dirprm/
cp ~/ODIS_to_ODIT1/src/diroby/* ~/ogg_src/dirprm/
cd ~/ogg_src/dirdat
mkdir ODISoc
cd ..
./ggsci
obey ODISS.oby
start mgr
info all –Check every process is running
exit
defgen PARAMFILE ./dirprm/ODISD.prm
cp ./dirdef/ODISC.def ~/ogg/dirdef/
Target
cd ~/oggcp ~/ODIS_to_ODIT1/stg/dirprm/* ./dirprm/
cp ~/ODIS_to_ODIT1/stg/diroby/* ./dirprm/
mkdir ./dirdat/ODIT1op
./ggsci
obey ODIT1T.oby
start mgr
info all
exit
Build CDC Interface
From ODI studio --> Designer tab -->Select Mapping tab, drag the city table from GG_STAGING model and drop it to the source panel.

Drag the city from GG_TARGET model and drop it to Target Database panel.
Select city, the Property Inspector tab shows on the right-down, and select “Journalized Data Only” check box, and save.
Click filter next to city, from Property Inspector tab à Implementation, change it to JRN_SUBSCRIBER=’ODI’, and save your changes.
Run the Interface
Designer tab --> Models --> GG_STAGING --> Changed Data Capture --> Consumption, click Lock Subscriber.
ODI menu --> Execute.
Designer tab --> Models --> GG_STAGING --> Changed Data Capture --> Consumption,
click Unlock Subscriber.
Check execution status
Operator tab --> Agent -->
To view data in the target schema, Models --> GG_TARGET --> CITY, right click and select View Data.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/638844/viewspace-1062175/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Step by Step Data Replication Using Oracle GoldenGateOracleGo
- How To Replicate Data from Oracle to Postgres Using GoldenGate (Doc ID 1544137.1OracleGo
- 4.1.6 Oracle Restart 與 Oracle Data Guard 整合OracleREST
- ORACLE GoldenGate Initial LoadOracleGo
- About the Oracle GoldenGate TrailOracleGoAI
- Oracle GoldenGate 18.1 支援的DB和OS列表OracleGo
- Oracle GoldenGate 18.1釋出OracleGo
- Oracle GoldenGate安裝(一)OracleGo
- Oracle GoldenGate安裝(二)OracleGo
- Oracle GoldenGate安裝(三)OracleGo
- Oracle Data Guard和Broker概述Oracle
- Oracle GoldenGate常用引數詳解OracleGo
- 使用GoldenGate 遷移Oracle到PostgreSQL/LightDBGoOracleSQL
- oracle和mybatis整合,批次插入OracleMyBatis
- Oracle案例13—— OGG-01163 Oracle GoldenGate Delivery for Oracle, reprpt01.prmOracleGo
- A Oracle Data Guard Broker 升級和降級Oracle
- ORACLE GoldenGate 使用技巧-容錯處理等OracleGo
- Oracle Goldengate 12c打pus補丁OracleGo
- Oracle data link建立Oracle
- SAP ECC & APO整合 - Master Data & Transaction Data TransferAST
- SpringBoot整合Spring Data JPASpring Boot
- 用python生成oracle goldengate複製配置檔案PythonOracleGo
- Oracle GoldenGate 11g官方文件Administrator’s GuideOracleGoGUIIDE
- 【ASK_ORACLE】Oracle Data Guard(二)物理備庫的概念和優勢Oracle
- 【ASK_ORACLE】Oracle Data Guard(四)快照備庫的概念和優勢Oracle
- Oracle Data Guard Broker元件Oracle元件
- Oracle Data Guard簡介Oracle
- Oracle GoldenGate同步服務歸檔空間維護OracleGo
- Oracle Goldengate(ogg) 12c認證考試流程OracleGo
- Oracle GoldenGate Veridata 12.2.1.4安裝配置使用全手冊OracleGo
- Spring Boot:整合Spring Data JPASpring Boot
- 【ASK_ORACLE】Oracle Data Guard(三)邏輯備庫的概念和優勢Oracle
- Oracle Goldengate是如何保證資料有序和確保資料不丟失的?OracleGo
- Oracle GoldenGate 11g官方文件Administrator’s Guide續二OracleGoGUIIDE
- Oracle GoldenGate 11g官方文件Administrator’s Guide續一OracleGoGUIIDE
- Oracle GoldenGate 11g官方文件Administrator’s Guide續三OracleGoGUIIDE
- Oracle GoldenGate 11g官方文件Administrator’s Guide續四OracleGoGUIIDE
- 1 關於 Oracle Data GuardOracle
- 2 Oracle Data Guard 安裝Oracle