3 Oracle GoldenGate Classic for Oracle

3.1 Deploying Oracle GoldenGate Classic Architecture for Oracle Database

By using Oracle GoldenGate Classic Architecture on Marketplace, you can deploy Oracle GoldenGate in an off-box architecture, which means you can run and manage your Oracle GoldenGate deployment from a single location.

Here are the prerequisites required to deploy Oracle GoldenGate Classic:

3.2 Finding Oracle GoldenGate within the Oracle Cloud Marketplace

To launch Oracle GoldenGate Classic, from Oracle Cloud Marketplace follow these steps:

  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.

3.3 Launching Oracle GoldenGate Classic

The following steps help you to launch Oracle GoldenGate Classic on Oracle Cloud Marketplace using the TerraForm stack:
  1. From the Application page, select Get App.
  2. Select OCI Region or Log in using your OCI account login credentials.
    • OCI Region – Select the OCI Region for which you want to install the compute node and click Create Stack.
  3. In the Sign In to the Cloud Tenant page, provide the OCI tenant details.
  4. Sign in to the Identity provider.
  5. On the Oracle GoldenGate 19c for Oracle page, provide the following information:
    • Select Version - It provides a list of versions that are available in the listing.
    • 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.
    • Terms of Use - This checkbox is selected by default. Oracle recommends to review the licenses before proceeding.
    • Launch Stack - It launches the stack in the OCI environment.
  6. Fill in the Stack Information, which includes the name of the stack, description and tags. The details of the compartment where the compute node is built are pre-populated and are not editable. Click Next.
  7. Fill in the required details to Configure Variables. This information is required to build the compute node for Oracle GoldenGate Classic.
    • Name for New Resources -
      1. Display Name – Display name used to identify all new OCI resources.
      2. Host DNS Name – Name of the Domain Name Service for the new compute node.
    • Network Settings -
      1. Create New Network – Select this check box if you wish to create a new network resource.
        • If you select this check box, the Create New Network wizard appears allowing you to add and edit the new network information.
        • 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.
      2. Network Compartment (optional) – Compartment for new or existing network resources.
      3. VCN (optional) – Existing VCN to use for the newly created instance if you are not creating a new network.
      4. Subnet (optional) – Existing subnet to use for the newly created instance if you are not creating a new network.
    • Instance Settings -
      1. Compute Shape – Shape of new compute instance. Supported shapes are VM.Standard2.4, VM.Standard2.8, VM.Standard2.16 and VM.Standard2.24.
      2. Assign Public IP – Select this check box to indicate if the new VM should have a public IP address.
      3. Availability Domain – The availability domain for the new Oracle GoldenGate instance.
      4. Custom Volume Sizes – Select this check box to customize the size of new block storage volumes.
    • SSH Public Key - Public Key used for allowing SSH access as the opc user
  8. Click Next.
  9. On the Review page, review the information you provided and then click Create.
  10. After clicking Create, you are navigated to the Stacks Job Details page. From this page, you can monitor the creation of compute node.
  11. Once you see the build successful message from the Job Details page, you can now view the Oracle GoldenGate Classic compute node under Compute -> Instances.

3.4 Getting Started with Oracle GoldenGate Classic Compute Node

To access your new Oracle GoldenGate deployment, 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 is running. The following steps help you to identify the public IP address:
  1. Log in to your Oracle Cloud Console.
  2. Select Compute -> Instances.
  3. Select the hyperlink name of the compute node. The public IP Address is listed under Primary VNIC Information.
  4. 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>

3.4.1 Running GGSCI

Oracle GoldenGate Classic allows you to quickly access any of the Oracle GoldenGate environments without the need of setting up environment variables per installation.

A custom utility called ggsci is available in the /usr/local/bin directory, which helps you to ensure correct environment variables are created in the environment. But for using this, you have to set a mandatory parameter. For example, for Oracle Database 19c:

-bash-4.2$ ./ggsci oracle19

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.1 OGGCORE_19.1.0.0.0_PLATFORMS_190524.2201_FBO
Linux, x64, 64bit (optimized), Oracle 19c on May 25 2019 15:07:20
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.

GGSCI (ogg19ccls) 1>
If you did not mention the Oracle Database version in the command, then it displays the usage information with the required details as follows:
-bash-4.2$ ./ggsci
Usage:   ./ggsci <oracle-version>
Example: ./ggsci oracle11, oracle12, oracle18, oracle19

Note:

Do not run the GGSCI command from the /u01/app/ogg directory.

3.4.2 Creating Oracle GoldenGate Subdirectories

You can configure Oracle GoldenGate Classic after setting the environment variables. To create the subdirectories needed for Oracle GoldenGate, navigate to the Oracle GoldenGate home and access Oracle GoldenGate Software Command Interface (GGSCI). Create the subdirectories as described in Installing Oracle GoldenGate User Guide.
$ cd $OGG_HOME
$ ./ggsci
GGSCI> create subdirs

After creating the sub-directories, you can find them in /home/opc/oracle<##> directory. Although they appear in /home/opc/oracle<##> location, the contents are written to/u02/deployments/<directory>. This helps you to improve tolerance, if something had happened to the Oracle GoldenGate Compute Node.

3.5 Getting Started with Oracle GoldenGate Classic for Oracle Database

After deploying Oracle GoldenGate Classic on the Oracle Cloud Marketplace, you can access the latest release of Oracle GoldenGate Classic.

Before you can start using Oracle GoldenGate Classic, 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:

3.5.1 Configuring Source or Target Database for Replication

Before you can begin replicating, you should prepare the source or target database to support Oracle GoldenGate. To prepare your database, follow the steps listed in Preparing the Database for Oracle GoldenGate section of Using Oracle GoldenGate for Oracle Database guide. The steps listed in the Using Oracle GoldenGate for Oracle Database guide helps you to enable logging and kernel parameters, set the flashback query and manage server resources.

3.5.2 Establishing Connectivity with Oracle GoldenGate Classic

The Oracle GoldenGate Classic on Marketplace compute node acts as a hub where you can manage your connections to source and target database. To do this, establish a network connection between the compute node and your source and target database. The compute node is pre-configured with the Oracle Database Client software and is ready to use.

You have to provide sqlnet.ora and tnsnames.ora files in the TNS_ADMIN directory, to establish connection between source or target database and the compute node. On a deployment basis, the TNS_ADMIN directory has been established as /u02/deployments/<deployment_name>.

3.5.3 Updating Network Related Files for Oracle GoldenGate Classic

The Oracle GoldenGate on Marketplace Compute Node comes pre-configured with Oracle Client installed. In order to establish network configuration between the compute node and the source or target systems within your architecture, you have to add or update the network related files in the Oracle Client.

You can find these files in the TNS_ADMIN location and the recommended location is/u02/deployment/oracle<##>/network/admin. To create this structure per Oracle Client release, perform the following steps:

  1. Connect to the Oracle GoldenGate Marketplace Compute Node, using opc user credentials.
  2. Change directories to the location /u02/deployment/oracle<##>.
  3. Create the directory structure for TNS_ADMIN
    mkdir -p ./network/admin

    Note:

    If you want the networking directory structure to be consistent with other Oracle products, you must append /network/admin to the directory structure. For this you have to change the environment variable TNS_ADMIN. For more information on Local Naming Parameters, refer to Database Net Services Reference.
  4. Copy the existing sqlnet.ora and tnsnames.ora files to the admin directory. You have to add or update these files on the compute node.

    The following is an example of sqlnet.ora file:

    
    NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
    NAMES.DEFAULT_DOMAIN = ora.com

    The following is an example of tnsnames.ora file:

    TEST =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = test2)(PORT = 1521))
        )
    (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = test)
      )
    )

3.5.4 Creating Database Credentials for Oracle GoldenGate Classic

Use the credential store to store and use database credentials for the source and target databases for Oracle GoldenGate Classic. Use the tnsnames.ora file to connect to the required database.

To create database credentials, perform the following tasks:

  1. Log in to the Oracle GoldenGate Compute Node.
    $ ssh -i <private key> opc@<public_ip_address>
  2. Navigate to /usr/local/bin and execute ggsci.
    $ cd /usr/local/bin
    $ ggsci oracle<##>
  3. Add the credential store to the configuration.
    ggsci> add credentialstore 
  4. Alter the credential store to add the required login credentials.
    ggsci > alter credentialstore add user <user_id>@<tnsnames_string> password ******** alias <alias_name> domain OracleGoldenGate
  5. Log in to the database to test the connection.
    ggsci > dblogin useridalias <alias_name> domain OracleGoldenGate

3.5.5 Adding SchemaTrandata for Oracle GoldenGate Classic

After adding the credential for connecting to the source database, you must enable supplemental logging on the source schema. The following steps are used to add SchemaTrandata to the source schema:
  1. Log in to the Oracle GoldenGate Compute Node.
    $ ssh -i <private key> opc@<public_ip_address>
  2. Execute GGSCI.
    $ cd /usr/local/bin
    $ ./ggsci oracle<##>
  3. Connect to the source database using the credential store alias.
    ggsci > dblogin useridalias <alias_name> domain OracleGoldenGate
  4. Add supplemental logging to the schema using schematrandata.
    ggsci > add schematrandata <schema>

    Note:

    If your source database is multitenant and you are connecting to the root using a c## user, from Oracle Database 12.1 and later, you have to specify the PDB database with the schema. i.e. <pdb>.<schema>.

3.5.6 Creating Checkpoint Table for Oracle GoldenGate Classic

Checkpoint tables contain the data necessary for tracking the progress of the Replicat as it applies transactions to the target system. Regardless of the Replicat that is being used, it is a best practice to enable the checkpoint table for the target system.

Note:

You can predetermine a default checkpoint table name by ensuring the parameter CHECKPOINTTABLE <table name> in the GLOBALS file.

To create a checkpoint table, follow these steps:

  1. Log in to the Oracle GoldenGate Compute Node.
    $ ssh -i <private key> opc@<public_ip_address>
  2. Execute GGSCI.
    $ cd /usr/local/bin
    $ ./ggsci oracle<##>
  3. Connect to the target database using the credential store alias.
    
    ggsci > dblogin useridalias <alias_name> domain OracleGoldenGate
  4. Add checkpoint table.
    ggsci > add checkpointtable <schema>.checkpointtable

3.5.7 Enabling Heartbeat Table for Oracle GoldenGate Classic

The Automatic Heartbeat table is a key way to monitor latency within the Oracle GoldenGate framework. Heartbeat tables provide you a way to gauge the end-to-end throughput within the configuration and identify any potential bottlenecks in the network. For a multitenant database, you have to create a heartbeat table in each PDB to which OGG can apply data.

To implement the Automatic Heartbeat table, perform the following steps:

  1. Log in to the Oracle GoldenGate Compute Node.
    $ ssh -i <private key> opc@<public_ip_address>
  2. Execute GGSCI.
    $ cd /usr/local/bin
    $ ./ggsci oracle<##>
  3. Connect to the source or target database using the credential store alias.
    ggsci > dblogin useridalias <alias_name> domain OracleGoldenGate
  4. Add automatice heartbeat table.
    ggsci > add heartbeattable
For more information on the Automatic Heartbeat functionality, refer to Monitoring Oracle GoldenGate Processing documentation.

3.5.8 Configuring Capture Support for Oracle GoldenGate Classic

Before you can begin replication, you have to set up the capture process. The capture process is also known as Extract. Oracle GoldenGate Classic supports three type of Extracts. They are:
  • Classic Extract
  • Integrated Extract
  • Initial Load Extract

To decide on which type of capture to use, refer to Deciding Which Capture Method to Use section of Using Oracle GoldenGate for Oracle Database Guide.

To build any of these Extracts, perform the following steps in Oracle GoldenGate Classic:

  1. Log in to the Oracle GoldenGate Compute Node.
    $ ssh -i <private key> opc@<public_ip_address>
  2. Execute GGSCI.
    $ cd /usr/local/bin
    $ ./ggsci oracle<##>
  3. Connect to the source database using the credential store alias.
    ggsci > dblogin useridalias <alias_name> domain OracleGoldenGate
  4. Add an Extract.
    • For Classic Extract -
      ggsci > add extract <extract_name>, tranlog, begin now
      ggsci > add exttrail ./dirdat/aa, extract <extract_name>
    • For Integrated Extract -
      ggsci > add extract <extract_name>, integrated tranlog, begin now
      ggsci > register extract <extract_name>, database container (<pdb_ame>)
      ggsci > add extrail ./dirdat/aa, extract <extract_name>
    • For Initial Load Extract -
      ggsci > add extract <extract_name>, sourceistable

3.5.9 Configuring Apply Support for Oracle GoldenGate Classic

The apply process for replication, also known as Replicat, is very easy and simple to configure. There are five types of Replicats supported by Oracle GoldenGate Classic and these Replicats are:
  • Integrated Replicat
  • Classic Replicat
  • Coordinated Replicat
  • Parallel Replicat in Integrated Mode
  • Parallel Replicat in Non-Integrated Mode

To decide on which Replicat to use, refer to Deciding Which Apply Method to Use section of Using Oracle GoldenGate for Oracle Database Guide.

To build any of these Replicats, perform the following steps on Oracle GoldenGate Classic:

  1. Log in to the Oracle GoldenGate Compute Node.
    $ ssh -i <private key> opc@<public_ip_address>
  2. Execute GGSCI.
    $ cd /usr/local/bin
    $ ./ggsci oracle<##>
  3. Connect to the source database using the credential store alias.
    ggsci > dblogin useridalias <alias_name> domain OracleGoldenGate
  4. Add a Replicat.
    • For Classic Replicat:
      ggsci > add replicat <replicat_name>, exttrail ./dirdat/ab, checkpointtable <schema>.<checkpointtable>
    • For Coordinated Replicat:
      ggsci > add replicat <replicat_name>, coordinated [maxthreads <number>], exttrail ./dirdat/ab, checkpointtable <schema>.<checkpointtable>
    • For Parallel Replicat in Non-Integrated Mode:
      ggsci > add replicat <replicat_name>, parallel, exttrail ./dirdat/ab, checkpointtable <schema>.<checkpointtable>

    Note:

    You can use only Classic Replicat or Parallel Replicat in Non-Integrated mode for replication to Autonomous Data Warehouse and Autonomous Transaction Processing.

3.6 Connecting to Data Resources for Oracle GoldenGate Classic

Learn about different methods of connecting Oracle GoldenGate data sources and targets. It includes the following connection types:

3.6.1 Connecting to Oracle Database (on-premises) for Oracle GoldenGate Classic

You can use Oracle GoldenGate Classic on Marketplace to remotely capture from and apply data to on-premises Oracle database resources. This allows you to enable replication and centrally manage the replication processes.

Use Cases for Replication

You can use Oracle GoldenGate Classic to replicate data between data resources in the following use cases:

  • Migrations
  • Data Distribution
  • Real-Time Data Warehousing
  • Operational Reporting
Replicating Data from On-premises

Prerequisites

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

  • Oracle GoldenGate Classic
  • Source Database
  • Target Database

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

3.6.1.1 Configure Oracle Database for Replication
To prepare your on-premise Oracle database(s) for replication, perform the following tasks:
  1. Configure Logging Properties
    • Enable Supplemental Logging
  2. Enable Oracle GoldenGate within the Oracle Database
    • Update parameter for enable_goldengate_replication

For more details, refer to Preparing the Database for Oracle GoldenGate documentation.

3.6.1.2 Configure Oracle GoldenGate Classic Compute Node

To establish connection from the Oracle GoldenGate Classic Compute Node to your on-premises database, you must edit the tnsnames.ora file and point the entry to your database resources.

By default, the environment variable TNS_ADMIN is pre-configured for each deployment. But the files tnsnames.ora or sqlnet.ora are not readily available on the compute node. You need to create the files or copy them from an existing file. You can locate the files tnsnames.ora or sqlnet.ora in the pre-configured locarion as illustrated in the below table:

Table 3-1 Oracle Database Client directories

Oracle Database Version Directory

Oracle 11g

/u02/deployments/oracle<##>/network/admin

Oracle 12c

/u02/deployments/oracle<##>/network/admin

Oracle 18c

/u02/deployments/oracle<##>/network/admin

Oracle 19c

/u02/deployments/oracle<##>/network/admin

Note:

  • If you are using Oracle Autonomous product client credentials, then you have to edit the tnsnames.ora file.
  • If you want your networking directory structure to be consistent with other Oracle products, you must append /network/admin to the directory structure. For this you have to change the environment variable TNS_ADMIN. For more information on Local Naming Parameters, refer to Database Net Services Reference.

3.6.2 Connecting to Oracle Database as a Service for Oracle GoldenGate Classic

You can use Oracle GoldenGate Classic on Marketplace to remotely capture and apply data to Oracle Cloud Infrastructure (OCI) Database as a Service (DBaaS) resources. This allows you to enable replication in a scalable fashion, centralize the point of management, and enable replication between cloud services.

Replicating Data to OCI Database as a Service

Prerequisites

Ensure you have the following prerequisites before replicating data from on-premises:

  • Oracle GoldenGate Classic on Marketplace
  • Source Database
  • Oracle Cloud Infrastructure (OCI) Database as a Service (DBaaS) Instance

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

3.6.2.1 Configure Oracle Database for Replication
To prepare your on-premise Oracle database(s) for replication, perform the following tasks:
  1. Configure Logging Properties
    • Enable Supplemental Logging
  2. Enable Oracle GoldenGate within the Oracle Database
    • Update parameter for enable_goldengate_replication

For more details, refer to Preparing the Database for Oracle GoldenGate documentation.

3.6.2.2 Configure Oracle GoldenGate Classic Compute Node

To establish connection from the Oracle GoldenGate Classic Compute Node to your on-premises database, you must edit the tnsnames.ora file and point the entry to your database resources.

By default, the environment variable TNS_ADMIN is pre-configured for each deployment. But the files tnsnames.ora or sqlnet.ora are not readily available on the compute node. You need to create the files or copy them from an existing file. You can locate the files tnsnames.ora or sqlnet.ora in the pre-configured locarion as illustrated in the below table:

Table 3-2 Oracle Database Client directories

Oracle Database Version Directory

Oracle 11g

/u02/deployments/oracle<##>/network/admin

Oracle 12c

/u02/deployments/oracle<##>/network/admin

Oracle 18c

/u02/deployments/oracle<##>/network/admin

Oracle 19c

/u02/deployments/oracle<##>/network/admin

Note:

  • If you are using Oracle Autonomous product client credentials, then you have to edit the tnsnames.ora file.
  • If you want your networking directory structure to be consistent with other Oracle products, you must append /network/admin to the directory structure. For this you have to change the environment variable TNS_ADMIN. For more information on Local Naming Parameters, refer to Database Net Services Reference.

3.6.3 Connecting to Oracle Autonomous Data Warehouse/Autonomous Transaction Processing

You can replicate data to Oracle Autonomous Data Warehouse Cloud Service (ADWCS) or Autonomous Transaction Processing (ATP) by using Oracle GoldenGate Classic on Oracle Cloud Marketplace. The steps described in this section, streamlines the approach for making a remote connection to Oracle Autonomous Database Warehouse Cloud Service (ADWCS).

For more information, refer to Replicating Data to the Autonomous Database section of Using Oracle GoldenGate for Oracle Database guide.

Use Cases for Replicating to Autonomous Database

Use Oracle GoldenGate Classic to replicate data to the Autonomous Data Warehouse for:

  • Real-time Data Warehousing
  • Operational Reporting
Replicating Data to Autonomous Data Warehouse

Prerequisites:

Ensure to have the following prerequisites before replicating data to Autonomous Data Warehouse:

  • Oracle GoldenGate Classic
  • Oracle Autonomous Data Warehouse Cloud Service
  • Your source database

To deliver data to the Autonomous Database using Oracle GoldenGate Classic, perform the following tasks:

3.6.3.1 Configure the Autonomous Data Warehouse for Replication

Unlock the Pre-created Oracle GoldenGate User (ggadmin)

Perform the following steps to configure the Autonomous Data Warehouse for Replication:

  1. Unlock and change the password for the pre-created Oracle GoldenGate user (ggadmin) within the Autonomous Data Warehouse. Use any SQL client tool to unlock the account.

    For more details, refer to About Connecting to an Autonomous Data Warehouse Instance section of Using Oracle Autonomous Data Warehouse guide.

    SQL> select * from dba_users order by username;
    SQL> alter user ggadmin identified by <password> account unlock;
  2. Check whether the parameter enable_goldengate_replicaton is set to true. If not, then modify the parameter.
    SQL> select * from v$parameter where name = 'enable_goldengate_replication';
    SQL> alter system set enable_goldengate_replication = true scope=both;

Create Target Schema

Complete the following steps to create schema and target objects that can be used in replication. This schema and associated objects does not support DDL replication.

  1. Create a new application user/schema. This user/schema stores the target objects for replication.

    Note:

    appadmin is an example user.
    SQL> create user appadmin identified by ********
    SQL> grant create session, resource, create view, create table to appadmin;
    SQL> alter user appadmin quota unlimited on data;
    
  2. Connect to the Oracle Autonomous Data Warehouse Cloud database as user/schema and create your application tables.
3.6.3.2 Autonomous Database Client Credentials

Obtain the Autonomous Database Client Credentials

To establish connection to your Autonomous Database, you must download the client credential files from the Autonomous Database Service Console. For more information, see Downloading Client Credentials section of Using Oracle Autonomous Data Warehouse guide .

Note:

If you do not have administrator access to the Autonomous Database, ask your service administrator to download and provide the credential files to you. Once you have the credential files for your Autonomous Database, you should upload the zip file to the Oracle GoldenGate Compute Node.

Perform the following steps to obtain the Oracle Autonomous Data Warehouse Cloud account details:

  1. Log in to your Oracle Autonomous Data Warehouse Cloud account.
  2. From the Instance page, click the menu option for the Autonomous Database instance and select Service Console.
  3. Log in to the Service Console using the admin username, and its associated password.
  4. In the Service Console, click the Administration tab.
  5. Click Download Client Credentials.
  6. Enter a password to secure your credentials zip file and click Download.
  7. Save the credentials zip file to your local system.

Move Client Credentials to Oracle GoldenGate Compute Node

In order to establish a connection from Oracle GoldenGate to the Autonomous Data Warehouse, you need to move the client credentials to Oracle GoldenGate Compute Node. The following steps will illustrate how to move the credential zip file from your machine to Oracle GoldenGate Compute Node.

  1. Connect to the Oracle GoldenGate Classic Compute Node using SSH and opc user credentials.
    ssh -i <private_key> opc@<public_ip_address>
  2. Create a staging directory and grant the essential permissions and then exit the session.
    $ mkdir stage
    $ exit
    
  3. Copy the credentials zip file to the Oracle GoldenGate Classic Compute Node.
    $ scp ./<credential_file>.zip opc@<public_id_address>:~/stage
  4. Connect to the Oracle GoldenGate Classic Compute Node.
    ssh -i <private_key> opc@<public_ip_address>
  5. Verify whether the credentials zip file is available in the stage location.
    $ cd ~/stage
    $ ls -ltr
    

Configure Oracle Goldengate Compute Node with Autonomous Client Credentials

After moving the ADWC Client Credentials to the Oracle GoldenGate Compute Node, you have to install the necessary files and ensure you have a connection to the Autonomous Data Warehouse. The following steps will help you configure the required SQL*Net components:

  1. Log in to the Oracle GoldenGate Classic Compute Node using SSH and the opc user credentials.
    ssh -i <private_key> opc@<public_ip_address>
  2. Unzip the client credentials file into a temporary directory.
    unzip ./<credential_file>.zip -d ./client_credentials
  3. Copy the sqlnet.ora and tnsnames.ora files to the location of your TNS_ADMIN.
    $ cd ~/stage/client_credentials
    $ cp ./sqlnet.ora /u02/deployments/<deployment>/etc
    $ cp ./tnsnames.ora /u02/deployments/<deployment>/etc

    Note:

    If you want your networking directory structure to be consistent with other Oracle products, you must append/network/admin to the directory structure. For this you have to change the environment variable TNS_ADMIN. For more information on Local Naming Parameters, refer to Database Net Services Reference.
  4. Edit the sqlnet.ora file and replace the directory parameter with the location of the information pointing to the location where the client credentials were unzipped.
    $ cd /u02/deployments/<deployment>/etc
    $ vi ./sqlnet.ora

    Change ?/network/admin to /home/opc/stage/client_credentials.

  5. For testing purposes, set the TNS_ADMIN and ORACLE_HOME environment variables at the operating system level.

    Note:

    The Oracle GoldenGate Deployment(s) use the ORACLE_HOME and TNS_ADMIN environment variables that are set per deployment.
    $ export ORACLE_HOME=/u01/app/client/<oracle version>
    $ export TNS_ADMIN=/u02/deployments/<deployment>/etc
    
  6. Test the connection to Autonomous Data Warehouse by connecting to one of the entries in the tnsnames.ora file.
    $ cd $ORACLE_HOME/bin
    $ ./sqlplus appadmin/**********@orcladw_low
3.6.3.3 Configure Oracle Goldengate Classic for Replication

Perform the following steps for establishing a successful connection to the Autonomous Data Warehouse with Oracle GoldenGate Classic.

Add Oracle GoldenGate Credential to connect to Autonomous Data Warehouse

To add Oracle GoldenGate Credential details, to connect to Autonomous Data Warehouse:

  1. Log into the Oracle GoldenGate Compute Node.
    $ ssh -i <private key> opc@<public_ip_address>
  2. Navigate to /usr/local/bin and execute ggsci.
    $ cd /usr/local/bin
    $ ggsci oracle<##>
  3. Add the credential store to the configuration.
    ggsci> add credentialstore 
  4. Alter the credential store to add the required login credentials.
    ggsci > alter credentialstore add user <user_id>@<tnsnames_string> password ******** alias <alias_name> domain OracleGoldenGate
  5. Log in to the autonomous database to test the connection.
    ggsci > dblogin useridalias <alias_name> domain OracleGoldenGate