Connecting IBM App Connect to databases by using Open Database Connectivity (ODBC)

The following blog describes how to configure Open Database Connectivity (ODBC) to enable an integration application in IBM App Connect to connect to a database.

  • Connecting to Databases from App Connect Enterprise Containers

    This blog describes how to configure ODBC to enable an IBM App Connect Enterprise Toolkit integration in a containerized environment to connect to databases such as IBM Db2® and Oracle. This information relates to integration runtimes that are based on IBM App Connect Enterprise 12.

    1. To begin, create configuration objects of the following types to configure the ODBC connection:
      • odbc.ini type

        Most of the properties that are required to connect to a database by using ODBC are defined in an odbc.ini file, which typically stores fixed data source properties.

        Create the configuration object by using an odbc.ini file that defines settings such as the location of the database driver binary files, properties pertaining to how the connection behaves, and data source location details.

        Exception: For IBM Db2, omit the data source location details from the odbc.ini file.
      • Generic files or db2cli.ini type

        Although Oracle and other databases typically include the data source location details in the odbc.ini file, IBM Db2 requires these details in a separate file named db2cli.ini.

        • For an integration runtime that resolves to a spec.version value of 12.0.7.0-r5 or earlier, create a configuration object of type Generic files by using a db2cli.ini file in a ZIP archive. Include data source location details such as the host, port, and name in the db2cli.ini file.
        • For an integration runtime that resolves to a spec.version value of 12.0.8.0-r1 or later, create a configuration object of type db2cli.ini by using a db2cli.ini file that contains data source location details such as the host, port, and name.
      • setdbparms.txt type

        Create the configuration object by using a setdbparms.txt file that contains authentication credentials for connecting to the data source.

    2. Define the custom resource (CR) settings for the integration runtime to be deployed, and reference the configuration objects in this CR.
      Additional requirement for IBM Db2: For an integration runtime at version 12.0.7.0-r5 or earlier, manually declare a DB2CLIINIPATH environment variable that points to the location where the configuration object of type Generic files is extracted. For an integration runtime at version 12.0.8.0-r1 or later, a DB2CLIINIPATH environment variable is automatically set to point to the location where the db2cli.ini file is extracted.