Using GoldenGate to do initial load from IBM i / AS 400 to Oracle database

Using GoldenGate to do initial load from IBM i / AS 400 to Oracle database


Introduction

I don't know whether IBM is increasing their prices to maintain AS400 machines operational, but the fact is that i am getting more and more requests to migrate workloads from IBM DB2 databases to Oracle.

In this case the customer has requested not only a bidirectional data flow between DB2 and Oracle (next article upcoming :) ) but also they need do bring all data from DB2 database to Oracle database.

As Oracle GoldenGate Microservices architecture for IBM i its not there *yet*, i have to pull out the techniques from (g)old days and used the classic GoldenGate version which still i am passionate about. Command line wins :D

Here is the step by step:

The Environment

Source: IBM DB2 for i 7.4 running on IBM AS400 - Power 8

Target: Oracle Database 19c running on a EC2 AWS host

OGG Hub VM configuration:

  • Red Hat Enterprise Linux release 8.8 (Ootpa)
  • Java: OpenJDK Runtime Environment (build 1.8.0_382-b05)
  • IBM DS Driver v11.5 for ODBC CLI

 *Check OGG compatibility matrix to make sure to download the supported versions and required drivers

 

The Architecture

As a customer requirement no software was installed on source or target database servers, instead I have used the so called GoldenGate Hub. A simple VM with the following products installed to do Remote Capture and Delivery of data to the databases:

-      An Oracle GoldenGate for non-Oracle databases (classic version): where transactions are captured from IBM DB2 database using an extract process. The transactions are stored in trail files and save to the local host that will be read by Oracle GoldenGate for Oracle databases 21c .

-      An Oracle GoldenGate for Oracle databases 21c (Microservices version): where the trail files will be opened and replicate the data to the tables using a replicat process.


Objective

Bring all data from a DB2 schema and insert into Oracle database. We need to create the tables beforehand empty in Oracle DB.


Implementation

  1. create extract parameter file:

cd /app/oracle/time/product/version/21_3ogg_DB2_iSeries/dirprm/

[oracle@etime1-test dirprm]$ cat init_ORDERS.prm

SOURCEISTABLE

SOURCEDB B99555V, USERIDALIAS OGGEXT_B99555V

RMTHOST etime1-test.hostname.de, MGRPORT 9050

RMTFILE /app/oracle/time/product/version/21_3ogg_depl_ORA_SM/var/lib/data/init/ORDERS/a0

TABLE SCHEMA1.ORDERS;


  1. run the extract process:

       cd /app/oracle/time/product/version/21_3ogg_DB2_iSeries/        
       ./extract paramfile dirprm/init_ORDERS.prm reportfile dirrpt/init_ORDERS.rpt        


  1. check if trail file is created on target[oracle@etime1-test ORDERS]$ ls -ltr

total 398400-rw-r----- 1 oracle dba 203980189 Aug 23 15:29 a0000000[oracle@etime1-test ORDERS]$
        

  1. check the report file for the number of rows exported[oraetime@etime-test 21_3ogg_DB2_iSeries]$ cat dirrpt/ORDERS.rptReport at 2023-08-23 15:29:23 (activity since 2023-08-23 15:29:10)

Output to /app/oracle/time/product/version/21_3ogg_depl_ORA_SM/var/lib/data/init/ORDERS/a0:From table SCHEMA1.ORDERS:      #                   inserts:    166843        
#                   updates:         0        
#                   deletes:         0        
#                   upserts:         0        
#                  discards:         0 
        

  1. Access OGG Microservices for Oracle databases and prepare the replicat

-       click on the + button to Add Replicat

Article content


-       Select “non integrated replicat”, then click on Next

Article content


-       Fill out the basic information to configure the replicat, then click on Next

Article content
Article content

 

-       Add the mapping rules, then click on Create

Article content


-       A new replicat process will appear in a yellow status:

Article content


-       Click Action, then click start

Article content


You can monitor the progress of the initial load by doing a select count(*) target_table_name OR by checking the statistics of the replicat process.


Conclusion

In this article, we described how to do initial load from IBM DB2 for i into a relational database using a mix of classic and Microservices modes of GoldenGate. Please note that the classic architecture usage here is exceptional/valid only this database type. The OGG Microservices usage is highly recommended for all the others sources and targets as since GoldenGate 21c the classic Architecture has been deprecated.

Hope it was helpful. :)


Mason Taheri

Senior Oracle DBA | RAC & Multitenant Expert | Performance Tuning | ZDM & Cloud Migrations | EDW Architect | Database Security Specialist | MongoDB DBA

1mo

a great work , thanks for sharing

We did this for our multiple JD Edwards customers who chose to move out of AS400 As a service partner even though we provide options for our as400 customers to move to IBM cloud on power hardware to retain iseries platform AND to reduce net change effect in their landscape - customers still preferred to choose to move to oracle database and especially to oracle cloud #OCI mostly because of the price performance factor and 60-70% lower costs quoted in comparison to power platforms. Another reason to choose oracle database over SQL Server when migrating from as400 for JD Edward’s customers is the case sensitive string search behavior of iseries and oracle database being same by default. We had a customer who didn’t own a DB2 Driver required to run remote extract on the Linux box to pull data from as400 source. We didn’t push the customer to buy the driver and in fact we simply chose one step older version of golden gate where we need to install the GG agent on iseries to facilitate the extract process without the need of the DB2 driver!! if IBM is interested to retain its customers leaving as400 then they need to seriously come out with a strategy of competitive price performance for their power hardware on IBM cloud!!

JESUS BASTIDAS BRICEÑO

DBA Architect | Senior DBA | Administrador de base de datos Oracle | Database Administrator | SQL SERVER DBA | Azure Database Administrator |70X OCI|8X AZURE|2X GCP|2X AWS|1X Microsoft Fabric

1y

Grazie mille Juliana A. Gomes . Benedizioni a.

Klaus Bodensohn

Senior Director Oracle Key and Large Account Group

1y

Thanks Juliana. Great to know.

Karlheinz Hahner

Senior Database Professional

1y

Awesome 👍

To view or add a comment, sign in

More articles by Juliana A. Gomes

  • OCI GoldenGate and VCN Peering

    Use Case: Replicate Data Between Cloud Databases in Different Regions with VCN Peering while using only 1 OCI OGG…

    4 Comments
  • Oracle GoldenGate 21c Migration Utility

    Last Friday 12.11.

    4 Comments
  • Capture Kafka messages with Oracle Goldengate 21c

    Introduction Oracle has just announced last month a new version of GoldenGate 21.3.

    13 Comments
  • How do I read AWR?

    Sometimes we need to go trough difficult situations, where a deep analyse is needed in order to do a performance…

    1 Comment

Insights from the community

Others also viewed

Explore topics