Configure Replicat for Oracle Autonomous AI Database
This section assumes that the source environment is already configured and provides the steps required to establish replication in the Oracle Autonomous AI Database environment.
In the Oracle GoldenGate instance, you need to complete the following:
-
Follow the steps given in Prerequisites for Applying to Oracle Autonomous AI Database.
-
Follow the steps given in Unlock the Autonomous AI Database User for Oracle GoldenGate.
-
Follow the steps given in Obtain the Autonomous AI Database Client Credentials.
-
Log in to the server where Oracle GoldenGate was installed.
-
Transfer the credentials
zipfile that you downloaded from Autonomous AI Database to your Oracle GoldenGate instance. -
In the Oracle GoldenGate instance, unzip the credentials file into a new directory
/u02/data/adwc_credentials. This is your key directory. -
To configure the connection details, open your
tnsnames.orafile from the Oracle client location in the Oracle GoldenGate instance.cd /u02/data/adwc_credentials ls tnsnames.ora -
Edit the
tnsnames.orafile in the Oracle GoldenGate instance to include the connection details available in thetnsnames.orafile in your key directory (the directory where you unzipped the credentialszipfile downloaded from Oracle Autonomous AI 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.orafile:(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
file provided with the credentials file contains three database service names identifiable as:
*ADWC_Database_Name*_low *ADWC_Database_Name*_medium *ADWC_Database_Name*_highFor Oracle GoldenGate replication, use
.
-
To configure the wallet, create a
sqlnet.orafile in the Oracle client location in the Oracle GoldenGate instance.cd /u02/data/oci/network/admin ls sqlnet.ora tnsnames.ora -
Edit this
sqlnet.orafile to include your key directory.WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY="/u02/data/adwc_credentials"))) SSL_SERVER_DN_MATCH=yes -
Use the Admin Client to log in to the Oracle GoldenGate deployment.
-
Create a credential to store the
GGADMINuser and password for the Replicat to use. For example:ADD CREDENTIALSTORE ALTER CREDENTIALSTORE ADD USER ggadmin@databasename_low PASSWORD complex_password alias adb_alias -
Add and configure a Replicat to deliver to Autonomous AI 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.
The following example creates a Replicat (required to replicate to an Autonomous AI Database) called
rauto, and instructs it to begin now.ADD REPLICAT rauto, PARALLEL INTEGRATED, EXTTRAIL ./dirdat/etIf you want to replicate
HR.EMPintoCOUNTRY.EMPLOYEE, then your map statement would look like this:MAP HR.EMP, TARGET COUNTRY.EMPLOYEE;Note: You can use classic Replicat, coordinated Replicat, and parallel Replicat in non-integrated mode. Parallel Replicat in integrated mode is also supported for Autonomous AI Database.
-
You can now start your Replicat and perform data replication to the Autonomous AI Database. Here’s an example:
START REPLICAT rauto
Note: Autonomous AI 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 to avoid having to manually restart a Replicat when it times out.