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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle Data Integrator 介紹...Oracle
- Oracle Data Integrator 12c----包(Package)OraclePackage
- 資料倉儲—ETL—BusinessObjects Data Integrator 介紹Object
- Step by Step Data Replication Using Oracle GoldenGateOracleGo
- 4.1.6 Oracle Restart 與 Oracle Data Guard 整合OracleREST
- Installing Oracle Data Integrator 11.1.1.7 in Oracle Linux 6 u3(64bit)OracleLinux
- Oracle GoldenGate for Big Data 12.2.0.1的新特性OracleGo
- GoldenGate Supplemental Log DataGo
- Oracle goldengate 12c 新特性之完美支援Active Data GuardOracleGo
- Oracle GoldenGate 資料同步初始化最佳實戰(Data Pump)OracleGo
- GoldenGate<二> configure data pumpGo
- How To Replicate Data from Oracle to Postgres Using GoldenGate (Doc ID 1544137.1OracleGo
- 介紹ORACLE DATA GUARD——DATA GUARD概念和管理Oracle
- Oracle Data Guard和Broker概述Oracle
- oracle goldengate for oracle rac 的安裝和切換OracleGo
- goldengate for big data 12.3釋出Go
- goldengate for big data 12.2.0.1.1新增功能Go
- SAP ECC & APO整合 - Master Data & Transaction Data TransferAST
- Oracle GoldenGate 學習教程二、配置和使用OracleGo
- oracle goldengate 遠端捕獲和投遞OracleGo
- Oracle GoldenGate DirectorOracleGo
- oracle goldengate 配置OracleGo
- 【GoldenGate】Oracle GoldenGate(三) DDL同步配置GoOracle
- GoldenGate replication using a data definition file and DEFGEN utilityGo
- oracle和mybatis整合,批次插入OracleMyBatis
- 【GoldenGate】Oracle GoldenGate(二) 雙向同步配置GoOracle
- Oracle GoldenGate 18.1 支援的DB和OS列表OracleGo
- About the Oracle GoldenGate TrailOracleGoAI
- oracle goldengate維護OracleGo
- Oracle GoldenGate: 使用巨集OracleGo
- GoldenGate Oracle MSSQL DateGoOracleSQL
- A Oracle Data Guard Broker 升級和降級Oracle
- GoldenGate實現oracle和sqlserver雙向資料同步GoOracleSQLServer
- Oracle Data BufferOracle
- oracle data guard!!Oracle
- oracle data pumpOracle
- Oracle GoldenGate安裝(一)OracleGo
- Oracle GoldenGate安裝(二)OracleGo