Creating a Database Connection on Linux

Before creating a database connection for Oracle GoldenGate processes running on Linux, install the latest version of Microsoft ODBC driver for SQL Server (Linux).

Select the following link for download and installation steps:

https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15

For the installation, choose the steps listed under Red Hat Enterprise Linux and Oracle.

After the ODBC software is installed, follow the example below to create an ODBC DSN for Linux:
  1. Create a template file for your data source(s):

    vi odbc_template_file.ini
  2. Describe the data source in the template file. Multiple unique DSN entries can be listed in the template file, if needed.

    In the following example, mydsn_2019_source is the DSN name, which will be used with DBLOGIN and SOURCEDB or TARGETDB to connect to the Extract or Replicat to the database.
    [mydsn_2019_source]            
    Driver = ODBC Driver 18 for SQL Server            
    Server = myserver,1433            
    Database = source_database
    TrustServerCertificate=YES
  3. Install the data source using the following command.
    odbcinst -i -s -f odbc_template_file.ini

    This command adds the DSN to the system odbc.ini file. For more information, select the following link:

    https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/connection-string-keywords-and-data-source-names-dsns?view=sql-server-2017