4 Oracle GoldenGate Classic for DB2 for z/OS

4.1 Deploying Oracle GoldenGate Classic Architecture for DB2 for z/OS Platforms

Using Oracle GoldenGate Classic Architecture on Marketplace, you can deploy and manage your deployment from a single location.

Here are the prerequisites which are required to deploy Oracle GoldenGate Classic:

4.2 Finding Oracle GoldenGate for Non-Oracle (DB2 for z/OS) within the Oracle Cloud Marketplace

The following steps help you to deploy Oracle GoldenGate for non-Oracle (DB2 for z/OS) from Oracle Cloud Marketplace:
  1. Log in to Oracle Cloud Marketplace.
  2. From the Oracle Cloud Marketplace home page, use the search box under Applications and search for the keyword GoldenGate.
  3. From the Search Results, select Oracle GoldenGate for Non-Oracle.

4.3 Launching Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS)

The following steps help you to launch Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS) on Oracle Cloud Marketplace:
  1. From the application page, select Get App.
  2. Select OCI Region or Log in using your OCI account login credentials.
    1. OCI Region – Select the OCI Region for which you want to install the compute node.
    2. Click Create Stack.
  3. In the Sign In to the Cloud Tenant page, provide the OCI tenant details.
    You may be asked to sign in to your identity provider.
  4. On the Oracle GoldenGate 19c for Non-Oracle (DB2 for z/OS) page, find the selection box and provide the following information:
    1. Select Version – It provides a list of versions that are available in the listing. It is set to Oracle GoldenGate for Non-Oracle (BigData) by default.
    2. Select Compartment – Specifies the compartment where the compute node will be built. It is generally the location that you have access to build the compute node
    3. Terms of Use – This check box is selected by default. Oracle recommends to review the licenses before proceeding with the instance creation.
    4. Launch Stack – It launches the stack in the OCI environment.
  5. Fill in the required Stack Information, which includes name of the stack, description and tags. The details of the compartment in which you have to create the instance is pre-populated and it is not editable. After filling in the required details, click Next.
  6. Fill in the required details to Configure Variables. This information is required to build the compute node for Oracle GoldenGate for Non-Oracle (DB2 for z/OS):
    1. Name for New Resources -
      • Display Name - Display Name used to identify all new OCI resources.
      • Host DNS Name – Domain Name Service for the new compute node.
    2. Network Settings -
      • Create New Network – Select this check box, if you wish to create a new network resource.
        1. If you select this check box, the Create New Network wizard appears allowing you to add and edit the new network information such as:
          • Network Compartment
          • New VCN DNS Name
          • New VCN CIDR
          • New Subnet DNS Name
          • New Subnet CIDR
        2. If you do not select this check box, the Create New Network wizard does not appear and the compute node is created with the existing network options in the VCN.
      • Network Compartment (optional) – Compartment for new or existing network resources.
      • VCN (optional) – Existing VCN to use for the newly created instance if you are not creating a new network.
      • Subnet (optional) – Existing subnet to use for the newly created instance if you are not creating a new network. The subnet that you have selected must match the same Availability Domain set in the Instance Settings.
    3. Instance Settings -
      • Availability Domain – It specifies the availability domain for the newly created Oracle GoldenGate Instance. It must match the Subnet that you have selected in the Use Existing Network settings.
      • Compute Shape – Shape of new compute instance. Supported shapes are VM.Standard2.4, VM.Standard2.8, VM.Standard2.16, VM.Standard2.24
      • Assign Public IP – Indicates if the new VM should have a public IP address
      • Custom Volume Sizes – Use this checkbox to customize the size of new block storage volumes
    4. SSH Public Key - Public Key for allowing SSH access as the ‘opc’ user.
  7. Click Next.
  8. On the Review page, review the information you provided then click Create.
  9. After clicking Create, you will be taken to the Stacks page. You can monitor the creation of the compute node using this page.
  10. Upon completion, you can view the Oracle GoldenGate for Non-Oracle (DB2 for z/OS) compute node under Compute -> Instances.

4.4 Getting Started with Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS) Compute Node

After deploying Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS), log in to the compute node and access Oracle GoldenGate Software Command Interface (GGSCI). For this, you need to identify the public IP address of the compute node where Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS) is running. The following steps help you to identify the public IP address:

  • Log in to your Oracle Cloud Console.
  • Navigate to Compute -> Instances.
  • Select the hyperlink name of the compute node. The public IP address is listed under Primary VNIC Information.
  • To access the compute node where Oracle GoldenGate is running, connect as the opc account using SSH. For more information on how to access a node using the opc account refer to Connecting to an Instance.
A public SSH key is specified as a part of the deployment process and you can use the private key when you are connecting to the Oracle GoldenGate instance. The following example illustrates how you connect to the Oracle GoldenGate compute node:
ssh -i <private-key-filename> opc@<public-id-address>

4.4.1 Installing DB2 drivers

The required DB2 connection drivers are not pre-installed in Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS) compute node. You have to install one of the following DB2 connection drivers before using Oracle GoldenGate (listed from lightest to heaviest) :
  • IBM Data Server Driver for ODBC and CLI v10.5 or later
  • IBM Data Server Runtime Client v10.5 or later
  • IBM Data Server Client v10.5 or later
  • DB2 Connect v10.5 or later

For more information on these drivers, refer to Oracle GoldenGate Installation Guide

4.4.2 Running GGSCI

Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS) allows you to quickly access the GoldenGate Service Command Interface (GGSCI). After logging in to the compute node, you can find GGCSI from home -> db2zos directory (/home/opc/db2zos). From here, after setting the above DB2 Driver environment, you can execute GGSCI.
  1. To start GGSCI, excute the following commands:
    $ cd db2zos
    $ ./ggsci
    
  2. In GGSCI, create sub directories:
    ggsci>create subsirs
  3. Start manager:
    ggsci>start manager

4.5 Working with Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS)

After deploying Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS) on Oracle Cloud Marketplace, you can access the latest release of Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS).

Before you can start using Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS), there are a few tasks that you must perform to ensure that your environment is complete and ready to replicate your data. Before you begin data replication, you must perform the following tasks:

Topics:

4.5.1 Configuring Source and Target Database for Replication

Before you can begin replicating data, you should prepare the source or target database to support Oracle GoldenGate. To prepare your database, follow the steps listed in Installing Oracle GoldenGate for DB2 z/OS Databases chapter of Installing Oracle GoldenGate Guide. The steps listed here helps you to enable the requirements to capture and/or apply data to DB z/OS.

4.5.2 Establishing Connectivity

The Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS) on Oracle Cloud Marketplace compute node acts as a hub where you can manage your connections to source and/or target DB2 databases. To do this, establish a network connection between OCI compute node and your source and/or target DB2 databases. For this, you have to install the required IBM DB2 connection libraries on the OCI compute node.

After installing the necessary IBM DB2 connection libraries, to establish connectivity from an Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS) compute node to source and/or target DB2 databases, use the following options:

  • IPSec VPN
  • FastConnect

For establishing an IPSec VPN with OCI, refer to IPSec VPN documentation. For establishing a FastConnect connection, refer to the FastConnect documentation.

4.5.3 Configuring Capture Support

Before you can begin replication, you have to setup the capture process. The capture process is also known as Extract. For DB2 on z/OS platforms, Oracle GoldenGate Classic supports only Remote Extract.

Before installing Remote Extract, refer to Installing Extract Components section in Installing Oracle Goldengate Guide.

To build the remote extract, perform the following steps within Oracle GoldenGate for Non-Oracle:

  1. Log in to the Oracle GoldenGate Compute Node.
    $ ssh -i <private key> opc@<public_ip_address>
  2. Start GGSCI.
    $ cd db2zos
    $ ./ggsci
  3. Connect to the source database using the credential store.
    ggsci > alter credentialstore add user <user_id>@<connect_string> password ******** alias <alias_name> domain OracleGoldenGate
  4. Add an Extract.
    • Remote Extract
      ggsci > add extract <extract_name>, tranlog, begin now
      ggsci > add exttrail ./dirdat/aa, extract <extract_name>, megabytes 250

4.5.4 Configuring Apply Support

The apply process for replication, also known as Replicat, is very easy and simple to configure. To build a Replicat, perform the following steps with Oracle GoldenGate for Non-Oracle.
  1. Log in to the Oracle GoldenGate Compute Node.
    $ ssh -i <private key> opc@<public_ip_address>
  2. Start GGSCI.
    $ cd db2zos
    $ ./ggsci
  3. Add a Replicat.
    ggsci > add replicat <replicat_name>, exttrail ./dirdat/ab, checkpointtable <schema>.<checkpointtable>

4.6 Connecting to Data Resources

4.6.1 Connecting to DB2 z/OS (On-Premises)

You can use Oracle GoldenGate Classic for Non-Oracle (DB2 z/OS) on Oracle Cloud Marketplace to remotely capture and apply data to DB2 z/OS Database on-premises or across Oracle Cloud platforms. This allows you to enable replication between cloud services in a scalable fashion and centrally manage the replication processes.

Use Cases for Replication

Use Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS) to replicate data between data resources in the following use cases:

  • Migrations
  • Data Distribution
  • Real-Time Data Warehousing
  • Operational Reporting

Prerequisites

Ensure that the following are set up before you begin replication:

  • Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS)
  • Oracle DB2 Source or Target Database

To move data from on-premises to the cloud or from on-premises to on-premises, perform the tasks listed in the following sections:

4.6.1.1 Configuring Oracle DB2 z/OS for Replication

To prepare your Oracle DB2 z/OS database for replication, perform the tasks that are outlined in Installing Oracle GoldenGate for DB2 z/OS Databases chapter of Installing Oracle GoldenGate Guide and Preparing the DB2 for z/OS Databases for Oracle GoldenGate chapter of Using Oracle Goldengate for Heterogenous Databases Guide.

4.6.1.2 Configuring Oracle GoldenGate Classic for Non-Oracle (DB2 z/OS) Compute Node

To establish connection from Oracle GoldenGate Classic for Non-Oracle (DB2 for z/OS) compute node to your on-premise DB2 z/OS database, you must establish connectivity between OCI and on-premise database. To do this, you can use the following options:

  • IPSec VPN
  • FastConnect

For establishing an IPSec VPN with OCI, refer to IPSec VPN documentation. For establishing a FastConnect connection, refer to the FastConnect documentation.