Configure a Database Connection in Linux

To create a database connection in Linux, set up a data source name (DSN) inside the /etc/odbc.ini file.
  1. Create a DSN for each source or target database in the /etc/odbc.ini file.

    sudo vi /etc/odbc.ini
    #Sample DSN entries
    [ODBC Data Sources]
    PG_src=Oracle GoldenGate PostgreSQL Wire Protocol
    PG_tgt=Oracle GoldenGate PostgreSQL Wire Protocol
    [ODBC]
    IANAAppCodePage=4
    InstallDir=/u01/app/ogg
    [PG_src]
    Driver=/u01/app/ogg/lib/ggpsql25.so
    Description=Oracle GoldenGate PostgreSQL Wire Protocol
    Database=sourcedb
    HostName=remotehost
    PortNumber=5432
    [PG_tgt]
    Driver=/u01/app/ogg/lib/ggpsql25.so
    Description=Oracle GoldenGate PostgreSQL Wire Protocol
    Database=targetdb
    HostName=remotehost
    PortNumber=5432

    In the preceding examples:

    PG_src and PG_tgt are user defined names of a source and target database DSN 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, excluding special keyboard characters except for the underscore and dash.

    IANAAppCodePage=4 is the default setting but can be modified according to the following guidance, when the database character set is not Unicode.

    https://docs.progress.com/bundle/datadirect-connect-odbc-71/page/IANAAppCodePage_9.html#IANAAppCodePage_9

    InstallDir is the location of the Oracle GoldenGate installation folder.

    Driver is the location of the Oracle GoldenGate installation home, $OGG_HOME/lib/ggpsql25.so file.

    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 and it is recommended instead 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.

  2. Save and close the odbc.ini file.