Prepare Database Connection

Oracle GoldenGate for Yugabyte (PostgreSQL variant) connects to Yugabyte databases using a pre-packaged ODBC driver. Connections can be established using a Data Source Name (DSN) or using a direct connection and supplying the database server host, port, database, and other information.

Using DSN connections requires connection details to be listed in an odbc.ini file, while using direct entries are entered manually when adding a database connection from the web interface or from the Admin Client.

Note: PgBouncer is not supported for Oracle GoldenGate connections.

Note: Oracle GoldenGate does not support connections to Yugabyte that use Pgpool.

After performing the steps given below to create the DSN entries or you plan to use direct connections, proceed to the Add Database Connections topic to know how to create database connections.

Set up a DSN-based Connection

To create a DSN connection for Oracle GoldenGate processes, you will first need to add an environment variable for the Oracle GoldenGate for Yugabyte deployment and then create an odbc.ini file to store the connection attributes.

  1. Log in to the Service Manager web interface.

  2. From the left navigation pane, click Deployments and then select the deployment name for Yugabyte. This expands the various settings for the deployment.

  3. Click Configuration and then click the plus sign (+) next to Environment Variables.

  4. Provide the following information in the two available fields. For the Environment Variable Value field, ensure it is the absolute path of the odbc.ini file:

    Environment Variable Name = ODBCINI

    Environment Variable Value = /ogg/deployment/yugabyte/odbc.ini

  5. Click Submit to create the new variable and then restart the deployment from the Deployments pane, for the changes to take effect.

  6. In the Oracle GoldenGate installation’s deployment folder, manually create an odbc.ini file and add data sources in this file.

Use the following minimum settings when creating the DSN file:

The following is an example odbc.ini file with two DSN entries. The Data Source names used in the example below are PG_src and PG_tgt.

 

#[ODBC Data Sources]

[ODBC]

IANAAppCodePage=4

InstallDir=/datadirect

 

[PG_src]

Driver= ./datadirect/lib/ggpsql25.so

Description=Oracle GoldenGate PostgreSQL Wire Protocol

Database=sourcedb

HostName=remotehost

PortNumber=5432

 

| — |

[PG_tgt]

Driver=./datadirect/lib/ggpsql25.so

Description=Oracle GoldenGate PostgreSQL Wire Protocol

Database=targetdb

HostName=remotehost

PortNumber=5432

  1. Save and close the odbc.ini file.

  2. To set up the database connection from Oracle GoldenGate for a Yugabyte deployment, see Add Database Connections.