• Home
    • 2018
    • 2017
  • Oracle GoldenGate
    • Core Platform
    • Cloud Service
    • For Oracle DB
    • For Big Data
    • For MySQL
    • For DB2 z/OS
    • For DB2 LUW
    • For DB2 i
    • For Informix
    • For SQL Server
    • For Teradata
    • For AWS Aurora
    • Foundation Suite
    • Use Cases
  • Data Management
    • General
    • Big Data
    • Oracle Database
    • MySQL
    • MS SQL Server
    • IBM DB2
    • IBM Informix
    • Teradata
    • SAP ASE
  • Data Science
  • IT
    • IT Management
    • IT Technology
  • Reading
  • About
Jinyu's Blog
About Data, Database, Integration and IT 

How to perform real-time replication from Informix to Oracle?

2/25/2015

0 Comments

 
This example provides a step-by-step instruction on how to setup a real-time one-way replication from Informix IDS database to Oracle Database using Oracle GoldenGate. The example is available to download at ggs_informix_example.zip. 

Step 1: Creating the Tables
1. On the Informix IDS source, run the src_create_tbl.sql and src_load_data.sql to create example database, a table and load the sample data. 
[informix@ogg-1 demo_01]$ dbaccess <C:\Users\JIWANG\ggs_informix_example\informix_src\src_create_tbl.sql
...
Database selected.
Table created.
Database closed.
 
[informix@ogg-1 demo_01]$ dbaccess <C:\Users\JIWANG\ggs_informix_example\informix_src\src_load_data.sqlRun the scripts to create tables and load sample data (10 records):

2.On the Target, create the Oracle Database table
grant connect, resource to ggdemo identified by ggdemo;
grant dba to ggdemo;
  
connect ggdemo/ggdemo
  
create table table1(
col1            number not null,
col3            varchar(10),
PRIMARY KEY (col1));

Step 2: Creating the Defgen File

GGSCI>  edit param defgen
DEFSFILE ./dirdef/cap01.def,PURGE
sourcedb ol_informix1210
TABLE sourcedb.jiwang.mytbl1;
 
GGSCI (JIWANG-VBOX7) 69> sh defgen paramfile dirprm/defgen.prm
***********************************************************************
       Oracle GoldenGate Table Definition Generator for Informix
      Version 12.1.2.1.0 OGGCORE_12.1.2.1.0_PLATFORMS_140818.0929
   Windows x64 (optimized), Informix_SDK410 on Aug 18 2014 13:41:32
Copyright (C) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
 
                    Starting at 2015-02-23 20:53:54
***********************************************************************
Operating System Version:
Microsoft Windows Server 2012 , on x64
Version 6.2 (Build 9200)
Process id: 11412
***********************************************************************
**            Running with the following parameters                  **
***********************************************************************
DEFSFILE ./dirdef/cap01.def,PURGE
sourcedb ol_informix1210
2015-02-23 20:53:54  INFO    OGG-03036  Database character set identified as ISO
-8859-1. Locale: en_US.
2015-02-23 20:53:54  INFO    OGG-03037  Session character set identified as ISO-
8859-1.
TABLE sourcedb.jiwang.mytbl1;
Retrieving definition for sourcedb.jiwang.mytbl1.
 
Definitions generated for 1 table in ./dirdef/cap01.def.

Copy the defgen file to the dirdef folder in Oracle GoldenGate for Oracle Directory.

Step 3: Adding the Supplemental Logging on the Source

GGSCI> dblogin sourcedb ol_informix1210
2013-10-25 13:27:06  INFO    OGG-03036  Database character set identified as ISO-8859-1. Locale: en_US.
2013-10-25 13:27:06  INFO    OGG-03037  Session character set identified as UTF-8.
Successfully logged into database.
 
GGSCI (ogg-1.pssa.us.oracle.com) 10> info trandata *.*.*
Logging of supplemental log data (full row logging) is disabled for table sourcedb.jiwang.table1.
 
GGSCI (JIWANG-VBOX7) 22> add trandata sourcedb.jiwang.table1
Logging of supplemental log data (full row logging) is enabled for table sourcedb.jiwang.table1

Step 4: Creating the Extract and Data Pump

GGSCI > edit param  CAP01
extract CAP01
sourcedb ol_informix1210
TRANLOGOPTIONS GETMETADATAFROMVAM
GETTRUNCATES
EXTTRAIL dirdat/c1
TABLE sourcedb.jiwang.mytbl1;
 
GGSCI> add ext cap01,vam,begin now
EXTRACT added.
 
GGSCI> add exttrail dirdat/c1, extract cap01
EXTTRAIL added.
 
GGSCI> start ext cap01
Sending START request to MANAGER ...
EXTRACT CAP01 starting
 
GGSCI> info cap01
EXTRACT    CAP01     Last Started 2015-02-23 20:01   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:01 ago)
Process ID           6708
VAM Read Checkpoint  2015-02-23 19:59:45.379000
 
GGSCI> edit pmp02
extract pmp02
rmthost 144.25.0.109, mgrport 7020, compress, timeout 30
rmttrail ./dirdat/if
passthru
TABLE sourcedb.jiwang.table1;
  
GGSCI> add extract pmp02, exttrailsource dirdat/c1
 
GGSCI> add rmttrail ./dirdat/if, extract pmp02, megabytes 1

Step 5: Creating the Replicat

Then, add the replicat group:

GGSCI> edit param rep02
replicat rep02
userid ggdemo, password ggdemo
sourcedefs ./dirdef/cap01.def
GETTRUNCATES
discardfile ./dirrpt/rep010001.dsc, purge
HANDLECOLLISIONS
map sourcedb.jiwang.table1, target ggdemo.table1;
 
GGSCI> dblogin userid ggdemo, password ggdemo
Successfully logged into database.
 
GGSCI> add checkpointtable ggdemo.checkpointtbl
Successfully created checkpoint table ggdemo.checkpointtbl.
 
GGSCI> add replicat rep02, exttrail ./dirdat/if,checkpointtable ggdemo.checkpointtbl
REPLICAT added.

Step 6: Run the Replication

Start the Extract on Informix Side: 

GGSCI> start cap01
GGSCI> start pmp02

Start the replicat on Oracle Side 

GGSCI> start rep02

0 Comments



Leave a Reply.

    Oracle GoldenGate

    This blog has updates, tips and tricks for Oracle GoldenGate.

    Categories

    All
    12.1 New Feature
    12.2 New Feature
    12.3 New Feature
    Azure
    Basic Concepts
    Best Practices
    Cloud
    Customer Story
    DB2 For ISeries
    DB2 For LUW
    DB2 For Z/OS
    Disaster Recovery
    Globalization
    GoldenGate Fundamentals
    GoldenGate Security
    How To
    HP NonStop
    Informix IDS
    Installation
    JD_Edward
    Manager
    MySQL
    Network
    News
    Oracle DB
    Release
    SQL Server
    Sybase
    Teradata
    Top
    Troubleshooting
    Tutorial
    Use Case
    User Story

    Archives

    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    May 2016
    April 2016
    March 2016
    February 2016
    December 2015
    November 2015
    October 2015
    July 2015
    June 2015
    May 2015
    March 2015
    February 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    October 2013

    RSS Feed

Copyright © 2010-2027 Jinyu Wang.