Configure a Database Connection in Linux
/etc/odbc.ini file.
-
Create a DSN for each source or target database in the
/etc/odbc.inifile.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=5432In the preceding examples:
PG_srcandPG_tgtare 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=4is the default setting but can be modified according to the following guidance, when the database character set is not Unicode.InstallDiris the location of the Oracle GoldenGate installation folder.Driveris the location of the Oracle GoldenGate installation home,$OGG_HOME/lib/ggpsql25.sofile.Databaseis the name of the source or target database.HostNameis the database host IP address or host name.PortNumberis the listening port of the database.You can also provide a
LogonIDandPasswordfor 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 theUSERIDALIASparameter in Extract and Replicat. -
Save and close the
odbc.inifile.