Configure Replicat to Apply to an Oracle Autonomous Database

You can replicate into the Autonomous Database from any source database or platform that is supported by Oracle GoldenGate.

Topics:

Prerequisites for Configuring Oracle GoldenGate Replicat to an Autonomous Database

You should have the following details available with you:
  • Your source database with Oracle GoldenGate Extract processes configured and writing trails to where the Replicat is running to apply data to the Autonomous Database target.

  • Oracle Autonomous Database is environment provisioned and running.

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

Topics:

Configure Oracle GoldenGate for an Autonomous Database

Here are the steps to complete the configuration tasks:

Note:

Instructions are based on the assumption that the source environment is already configured. Learn the steps required to configure replication into the Autonomous Database environment.

  1. For Oracle GoldenGate on-premises, make sure that Oracle GoldenGate is installed.

    You can also use Oracle GoldenGate Microservices Architecture 21c for Marketplace for Oracle Autonomous Database Serverless 21c. Oracle GoldenGate Microservices Architecture 21c and higher support Autonomous Database capture using Marketplace for Oracle Autonomous Database Serverless.

  2. Create a deployment for your Oracle GoldenGate environment. This is the deployment where the Replicat that applies data into the Autonomous Database will be created.

  3. The Autonomous Database instance has a pre-created user for Oracle GoldenGate on-premise called ggadmin. The ggadmin user has been granted the required privileges for Replicat. This is the user where any objects used for Oracle GoldenGate processing will be stored, like the checkpoint table and heartbeat objects. By default, this user is locked. To unlock the ggadmin user, connect to your Oracle Autonomous Database instance as the ADMIN user using any SQL client tool. See About Connecting to Autonomous Database Instance.

  4. Run the ALTER USER command to unlock the ggadmin user and set the password for it. This will be used in the command line for any DBLOGIN operations on the Autonomous Database. It will be used in Replicat to allow Oracle GoldenGate to connect to the Autonomous Database and apply data.
    ALTER USER ggadmin IDENTIFIED BY p0$$word ACCOUNT UNLOCK;

Obtain the Autonomous Database Client Credentials

To establish a connection with an Oracle Autonomous Database instance, you need to download the client credentials files. There are two ways to download the client credentials files: the Oracle Cloud Infrastructure Console or Database Actions Launchpad.

For details, see Downloading Client Credentials (Wallets).

Note:

If you do not have administrator access to the Oracle Autonomous Database, you should ask your service administrator to download and provide the credentials files to you.

The following steps use the Database Actions Launchpad to download the client credentials files.

  1. Log in to your Autonomous Database account.

  2. From the Database Instance page, click Database Actions. This launches the Database Actions Launchpad. The Launchpad attempts to log you into the database as ADMIN. If that is not successful, you will be prompted for your database ADMIN username and password.

  3. On the Database Actions Launchpad, under Administration, click Download Client Credentials (Wallets).

  4. Enter a password to secure your Client Credentials zip file and click Download.

    Note:

    The password you provide when you download the wallet protects the downloaded Client Credentials wallet.
  5. Save the credentials zip file to your local system. The credentials zip file contains the following files:
    • cwallet.sso

    • ewallet.p12

    • keystore.jks

    • ojdbc.properties

    • sqlnet.ora

    • tnsnames.ora

    • truststore.jks

    • ewallet.pem

    • README.txt

    Refer and update (if required) the sqlnet.ora and tnsnames.ora files while configuring Oracle GoldenGate to work with the Oracle Autonomous Database instance.

Configure Replicat to Apply to an Autonomous Database

This section assumes that the source environment is already configured and provides the steps required to establish replication in the Oracle Autonomous Database environment.

In the Oracle GoldenGate instance, you need to complete the following:
  1. Follow the steps given in Prerequisites for Configuring Oracle GoldenGate Replicat to an Autonomous Database.

  2. Follow the steps given in Configure Oracle GoldenGate for an Autonomous Database.

  3. Follow the steps given in Obtain the Autonomous Database Client Credentials.

  4. Log in to the server where Oracle GoldenGate was installed.

  5. Transfer the credentials zip file that you downloaded from Oracle Autonomous Database to your Oracle GoldenGate instance.

  6. In the Oracle GoldenGate instance, unzip the credentials file into a new directory /u02/data/adwc_credentials. This is your key directory.

  7. To configure the connection details, open your tnsnames.ora file from the Oracle client location in the Oracle GoldenGate instance.
    cd /u02/data/adwc_credentials
    ls
    tnsnames.ora
  8. Edit the tnsnames.ora file in the Oracle GoldenGate instance to include the connection details available in the tnsnames.ora file in your key directory (the directory where you unzipped the credentials zip file downloaded from Oracle Autonomous Database).

    Sample Connection String
    graphdb1_low = (description= 
                    (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb-preprod.us-phoenix-1.oraclecloud.com))
                    (connect_data=(service_name=okd2ybgcz4mjx94_graphdb1_low.adb.oraclecloud.com))
                    (security=(ssl_server_cert_dn="CN=adwc-preprod.uscom-east-1.oraclecloud.com,OU=Oracle BMCS US,O=Oracle Corporation,L=Redwood City,ST=California,C=US")))
    If Replicat becomes unresponsive due to a network timeout or connection lost, then you can add the following into the connection profile in the tnsnames.ora file:
    (DESCRIPTION =  (RECV_TIMEOUT=120)   (ADDRESS_LIST =
          (LOAD_BALANCE=off)(FAILOVER=on)(CONNECT_TIMEOUT=3)(RETRY_COUNT=3) 
          (ADDRESS = (PROTOCOL = TCP)(HOST = adb-preprod.us-phoenix-1.oraclecloud.com)(PORT = 1522))

    Note:

    The tnsnames.ora file provided with the credentials file contains three database service names identifiable as:
    ADWC_Database_Name_low
    ADWC_Database_Name_medium
    ADWC_Database_Name_high
    For Oracle GoldenGate replication, use ADWC_Database_Name_low.
  9. To configure the wallet, create a sqlnet.ora file in the Oracle client location in the Oracle GoldenGate instance.
    cd /u02/data/oci/network/admin
    ls
    sqlnet.ora tnsnames.ora
  10. Edit this sqlnet.ora file to include your key directory.

    WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY="/u02/data/adwc_credentials"))) 
    SSL_SERVER_DN_MATCH=yes
  11. Use the Admin Client to log in to the Oracle GoldenGate deployment.

  12. Create a credential to store the GGADMIN user and password for the Replicat to use. For example:
    ADD CREDENTIALSTORE ALTER CREDENTIALSTORE ADD USER ggadmin@databasename_low PASSWORD complex_password alias adb_alias
  13. Add and configure a Replicat to deliver to Oracle Autonomous Database. When creating the Replicat, use the alias created in the previous step. For setting up your Replicat and other processes, see Add a Replicat.

    Note:

    You can use classic Replicat, coordinated Replicat, and parallel Replicat in non-integrated mode. Parallel Replicat in integrated mode is also supported for Oracle Autonomous Database.
  14. You can now start your Replicat and perform data replication to the Autonomous Database.

    Note:

    Oracle Autonomous Database times out and disconnects the Replicat when it is idle for more than 60 minutes. When Replicat tries to apply changes (when it gets new changes) after being idle, it encounters a database error and abends. Oracle recommends that you configure Oracle GoldenGate with the AUTORESTART profile using managed processes (Microservices Architecture) to avoid having to manually restart a Replicat when it times out.