Skip to main content

IBM Db2 Connection

The IBM Db2 connection type enables automations to execute queries, run stored procedures, and perform data operations against IBM Db2 database servers running on-premises or on IBM Cloud. It is used by the plugin-sql-databases plugin, which delegates to the sql-database-connector.

Connection Type

PropertyValue
Type IDIBMDB2
CategoryRelational Databases
TestableYes
Entity classDBConnectionDetails

Friendly Example

What you enterExample
Connection nameIBM Db2 - Core Records
Used forReading trusted enterprise records from a mainframe-backed Db2 instance for automated reconciliation
Main details to collectHost, port, database name, username, and password
Best person to provide itDatabase administrator or mainframe operations team

After it is saved, workflow builders select IBM Db2 - Core Records in a node instead of entering these details again.

Connection Modes

The IBM Db2 connection supports two modes. Choose the one that matches how your credentials are stored.

ModeWhen to use
All DetailsProvide host, port, database name, username, and password individually. The platform builds the JDBC URL automatically.
JDBC URLPaste a full JDBC connection string directly. Useful when your DBA provides a pre-built URL or when you need to pass advanced driver properties.

Mandatory Fields

FieldWhat It MeansExample
hostHostname or IP address of the Db2 serverdb2.internal.example.com
portTCP port Db2 is listening on. Default is 50000.50000
databaseName of the Db2 database to connect toCOREDB
usernameLogin name of the database userqinfinite_automation
passwordPassword for the database user. Encrypted at rest.••••••••
note

When using JDBC URL mode, replace the individual host, port, and database fields with a single jdbcUrl string in the format shown below.

JDBC URL Format

jdbc:db2://host:port/database

Example:

jdbc:db2://db2.internal.example.com:50000/COREDB

SSL/TLS in the JDBC URL

To require an encrypted connection, append SSL properties to the URL:

jdbc:db2://db2.internal.example.com:50000/COREDB:sslConnection=true;

You can also specify the location of a truststore containing the server's certificate:

jdbc:db2://db2.internal.example.com:50000/COREDB:sslConnection=true;sslTrustStoreLocation=/opt/certs/db2trust.jks;sslTrustStorePassword=changeit;
IBM Db2 JDBC URL syntax

Unlike MySQL or PostgreSQL JDBC URLs, Db2 JDBC properties are separated by semicolons and appended after the database name with a colon prefix, inside the URL itself. Always end the property list with a trailing semicolon.

Advanced Fields

FieldWhat It MeansExample
sslModeSSL enforcement level. Set to required to enforce an encrypted connection. Defaults to disabled.required
connectionTimeoutMaximum time in milliseconds to wait when establishing a connection before failing.10000

Setup Instructions

  1. Locate your Db2 instance details. Get the hostname (or IP address) and the port from your DBA or from the Db2 instance configuration. The default port is 50000. On IBM Cloud, navigate to your Db2 service instance and open the Service credentials tab to find the connection details.

  2. Create a dedicated database user with the minimum permissions required by your workflows. Connect to the Db2 instance as an admin and run:

    CREATE USER QINFINITE WITH PASSWORD 'StrongPassword123';
    CONNECT TO COREDB;
    GRANT CONNECT ON DATABASE TO USER QINFINITE;
    GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA MYSCHEMA TO USER QINFINITE;

    Replace COREDB and MYSCHEMA with your actual database and schema names. Grant BINDADD only if your workflows need to create or bind packages.

  3. Verify network access. The Qinfinite platform must be able to reach the Db2 host on port 50000 (or your configured port). Update firewall rules or security group settings to allow the platform's outbound IP address.

  4. Create the connection in the Global Configurator using the host, port, database name, and credentials from the steps above.

  5. Test the connection. Click Test Connection to confirm the credentials and network path are correct before saving.

Troubleshooting

SymptomLikely Cause
Connection refused or Communications link failureThe platform cannot reach the Db2 host on the configured port. Verify the host address, the port number, and firewall or security group rules allowing inbound traffic on that port.
SQL1403N The username and/or password supplied is incorrectThe username or password is wrong, or the OS-level user (Db2 uses OS authentication by default) does not exist on the Db2 server host. Confirm the credentials with your DBA.
SQL1042C An unexpected system error occurredThe Db2 instance may not be started, or the database is not active. Ask the DBA to verify that the instance and database are running (db2start and db2 activate database COREDB).
SSL connection error or GSKit errorSSL is enabled in the JDBC URL but the truststore path or password is wrong, or the server certificate is not present in the truststore. Verify sslTrustStoreLocation and sslTrustStorePassword, and ensure the Db2 server's certificate is imported into the JVM truststore.