Configuring a Database Connection in Linux

To create a database connection in Linux for Oracle GoldenGate processes, create a DSN (Data Source Name) inside the /etc/odbc.ini file. Multiple DSNs can be part of the same ODBC file.

Use the following minimum settings when creating the DSN file:
  • Data Source Name: A user defined name of a source or target database connection that will be referenced by Oracle GoldenGate processes, such as Extract or Replicat. DSN names are allowed up to 32 alpha-numeric characters in length, and can include only underscore (_) and dash (-) from special characters.

  • IANAAppCodePage=4: Is the default setting but can be modified according to the guidance specified on the https://docs.progress.com/bundle/datadirect-connect-odbc-71/page/IANAAppCodePage_9.html#IANAAppCodePage_9 page when the database character set is not Unicode.

  • InstallDir: Is the value of the Oracle GoldenGate installation path, for example: /u01/app/ogg.

  • Driver: For Oracle GoldenGate release versions prior to 21.8, set to /GoldenGate_Installation_Path/lib/GGpsql25.so.

    For Oracle GoldenGate release versions 21.8 and later, set the value to /<GoldenGate_Installation_Path>/datadirect/lib/ggpsql25.so.

  • Database: Is the name of the source or target database.

  • HostName: Is the database host IP address or host name.

  • PortNumber: Is the listening port of the database.

  • You can also provide a LogonID and Password for the Extract or Replicat user, but these will be stored in clear text. It is recommended to leave these fields out of the DSN and instead store them in the Oracle GoldenGate wallet as a credential alias, and reference them with the USERIDALIAS parameter in Extract and Replicat.

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

  1. Create a DSN for each source or target database in the /etc/odbc.ini file.
    sudo vi /etc/odbc.ini

  2. Save and close the odbc.ini file.

Note:

You can enable ODBC tracing without changing the ODBCINI file using the ODBCTRACE parameter. See ODBCTRACE in Parameters and Functions Reference for Oracle GoldenGate.