17 Using Oracle GoldenGate with Autonomous Database

You can replicate data to Oracle Autonomous Data Warehouse (ADW) and Autonomous Transaction Processing (ATP) using Oracle GoldenGate.

Topics:

17.1 About Replicating Data with Autonomous Databases

You can capture changes from the Autonomous Database on Shared Infrastructure (ADB) and replicate to any target database or platform that Oracle GoldenGate supports, including other Oracle Autonomous Databases.

Use Case: When Using Oracle GoldenGate with Autonomous Databases

Using Oracle GoldenGate in the Autonomous Database can be configured to support the following scenarios with the Autonomous Database environments:
  • Scalable Active-Active architecture: Synchronize changes made across two or more databases to scale out workloads, provide increase resilience and near instantaneous failover across multiple data centers or regions. Active-Active between cloud and On-Premise environments can also be done using Oracle GoldenGate.

  • Real-Time Data Warehouse: Provide continuous, real-time capture and delivery of changed data between Autonomous Transaction Processing and Autonomous Data Warehouse systems.

  • Big Data Integration: With Oracle GoldenGate for Big Data you can replicate data from the Oracle Autonomous Databases to provides real-time streaming integration to all platforms support by Big Data targets.

  • Real-Time Streaming Analytics: Oracle GoldenGate integrates seamlessly with Oracle Stream Analytics to enable users to identify events of interest by executing queries against event streams in real time. It allows creating custom operational dashboards that provide real-time monitoring, transform streaming data, or raise alerts based on stream analysis.

17.2 Understanding What is Supported When Replicating for Autonomous Databases

Review the supported data types and limitations before replicating data to the Autonomous Database.

Understanding Limitations

Oracle Autonomous Data Warehouse is a fully-managed data warehouse designed to support all standard SQL and business intelligence (BI) tools and deliver scalable analytic query performance. Oracle Autonomous Data Warehouse provides all of the performance of the market-leading Oracle Database in a fully-managed environment that is tuned and optimized for data warehouse workloads. Some data types, SQL commands, and database features are not available in Oracle Autonomous Data Warehouse.

For a complete list of database initialization parameter restrictions, database features restrictions, SQL commands restrictions, and data types restrictions, see Autonomous Data Warehouse Cloud for Experienced Oracle Database Users.

For more information on Autonomous Transaction Processing, see Getting Started wtih Autonomous Transaction Processing

The Oracle Database data types that are supported by Oracle GoldenGate can be replicated to Oracle Autonomous Data Warehouse. For a complete list of supported data types, see Details of Support for Oracle Data Types and Objects. The support limitations mentioned for replicating data to Oracle Database using Oracle GoldenGate apply to replicating data to Oracle Autonomous Data Warehouse too. There are additional limitations when replicating data into Oracle Autonomous Data Warehouse as listed in the following section.

Oracle GoldenGate Replicat Limitations for Autonomous Databases

These are the limitations of Oracle GoldenGate when replicating to or from the Autonomous Databases.

Data Type Limitations for DDL and DML Replication

The following data types are not supported while replicating data to Autonomous Databases:

  • LONG

  • LONG RAW

  • XMLTYPE STORE AS OBJECT RELATIONAL

  • XMLTYPE STORE AS BINARY

  • BFILE

  • MEDIA

  • SPATIAL

The following data types are supported only when the trail file is generated through an Extract.

  • ABSTRACT/USER DEFINED TYPE

  • UROWID

  • ANYDATA

Integrated Replicat and parallel Replicat in integrated mode are not supported.

DDL replication is supported depending on the restrictions in the Autonomous Databases.

17.3 Configuring Replicat to Apply to an Autonomous Databases

You can replicate into the Autonomous Database (ADB) from any source database or platform that Oracle GoldenGate supports, including Oracle Autonomous Databases.

Topics:

17.3.1 Prerequisites for Configuring Oracle GoldenGate Replicat to an Autonomous Database

Learn about the prerequisites for configuring Oracle GoldenGate data replication to Autonmous Databases.

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 (ADB) target.

  • Oracle Autonomous Data Warehouse or Autonomous Transaction Processing environment provisioned and running.

To deliver data to the Autonomous Database using Oracle GoldenGate, perform the following tasks:
  • Configure the Autonomous Database for replication by unlocking the pre-created Oracle GoldenGate database user ggadmin in the Autonomous Database.

  • Obtain the Autonomous Database client credentials.

  • Configure Oracle GoldenGate for replication.

    • Transfer client credentials ZIP file that you downloaded from the Autonomous Database.

    • Configure sqlnet.ora file.

    • Configure tnsnames.ora file.

    • Create useridalias for the ggadmin user.

  • Configure Oracle GoldenGate Replicat to deliver to the Autonomous Database.

17.3.2 Configure Oracle GoldenGate Replicat for an Autonomous Database

Learn the steps to configure Oracle GoldenGate Replicat for an Autonomous Databases.

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 establish replication into the Autonomous Database (ADB) environment.

  1. Install Oracle GoldenGate or use Oracle GoldenGate on OCI Marketplace for your Autonomous Database Platform. Oracle GoldenGate 19c supports Autonomous Database capture for both Classic Architecture and Microservices Architecture on Marketplace for 19c ADB Service Console (ADB-S).

  2. (Microservices only) Create a deployment for your Oracle GoldenGate environment. This is the deployment where the Replicat that applies data into the Autonomous Database (ADB) will be created. SeeHow to Create Deployments for steps to add a deployment.

  3. The Autonomous Database has a pre-existing user created for Oracle GoldenGate On Premises called ggadmin. The ggadmin user has been granted the right set of privileges for Replicat to work. By default, this user is locked. To unlock the ggadmin user, connect to your Oracle Autonomous Data Warehouse database as the ADMIN user using any SQL client tool. See About Connecting to Autonomous Data Warehouse Cloud.

  4. Run the alter user command to unlock the ggadmin user and set the password for it. This will be used in GGSCI or Admin Client 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. See Creating Users with Autonomous Data Warehouse Cloud.
    alter user ggadmin identified by password account unlock;

17.3.3 Obtain the Autonomous Database Client Credentials

Learn how to establish connection to your Autonomous Databases.

To establish connection to your Autonomous Database, download client credentials files from the Autonomous Database service console. See Downloading Client Credentials (Wallets).

Note:

If you do not have administrator access to the Autonomous Database you should ask your service administrator to download and provide the credentials files to you.
  1. Log into your Oracle Autonomous Data Warehouse account.

  2. From the Instance page, click the menu option for the Autonomous Database instance and select Service Console.

  3. Log into 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.

The credentials ZIP file contains the following files:
  • cwallet.sso

  • ewallet.p12

  • keystore.jks

  • ojdbc.properties

  • sqlnet.ora

  • tnsnames.ora

  • truststore.jks

Refer to the sqlnet.ora, cwallet.sso, ewallet.p12, and tnsnames.ora files, while configuring Oracle GoldenGate to work with the Autonomous Database.

17.3.4 Configure Oracle GoldenGate Replicat to Apply to an Autonomous Database

This feature supports both Autonomous Data Warehouse (ADW) and Autonomous Transaction Processing Database (ATP).

This section assumes that the source environment is already configured and provides the steps required to establish replication into the 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 Replicat for an Autonomous Database.

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

  4. Log into the server where Oracle GoldenGate was installed.

  5. Transfer the credentials zip file that you downloaded from Oracle Autonomous Data Warehouse 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 Data Warehouse).

    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. See Predefined Database Service Names for Autonomous Data Warehouse Cloud.
  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 into 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 Data Warehouse. For setting up your Replicat and other processes, see How to Add Replicats.

    Note:

    The Replicats used to apply data into an Autonomous Database must not be integrated Replicats. That means you can use classic Replicat, coordinated Replicat, or parallel Replicat in non-integrated mode. When creating the Replicat, use the alias created in the previous step.
  14. You can now start your Replicat and perform data replication to the Autonomous Database.

    Note:

    Oracle Autonomous Data Warehouse 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 AUTORESTART parameter (Classic Architecture) or configure the AUTORESTART profile (Microservices Architecture) to avoid having to manually restart a Replicat when it times out.