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
| Property | Value |
|---|---|
| Type ID | IBMDB2 |
| Category | Relational Databases |
| Testable | Yes |
| Entity class | DBConnectionDetails |
Friendly Example
| What you enter | Example |
|---|---|
| Connection name | IBM Db2 - Core Records |
| Used for | Reading trusted enterprise records from a mainframe-backed Db2 instance for automated reconciliation |
| Main details to collect | Host, port, database name, username, and password |
| Best person to provide it | Database 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.
| Mode | When to use |
|---|---|
| All Details | Provide host, port, database name, username, and password individually. The platform builds the JDBC URL automatically. |
| JDBC URL | Paste 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
| Field | What It Means | Example |
|---|---|---|
host | Hostname or IP address of the Db2 server | db2.internal.example.com |
port | TCP port Db2 is listening on. Default is 50000. | 50000 |
database | Name of the Db2 database to connect to | COREDB |
username | Login name of the database user | qinfinite_automation |
password | Password for the database user. Encrypted at rest. | •••••••• |
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;
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
| Field | What It Means | Example |
|---|---|---|
sslMode | SSL enforcement level. Set to required to enforce an encrypted connection. Defaults to disabled. | required |
connectionTimeout | Maximum time in milliseconds to wait when establishing a connection before failing. | 10000 |
Setup Instructions
-
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. -
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
COREDBandMYSCHEMAwith your actual database and schema names. GrantBINDADDonly if your workflows need to create or bind packages. -
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. -
Create the connection in the Global Configurator using the host, port, database name, and credentials from the steps above.
-
Test the connection. Click Test Connection to confirm the credentials and network path are correct before saving.
Troubleshooting
| Symptom | Likely Cause |
|---|---|
Connection refused or Communications link failure | The 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 incorrect | The 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 occurred | The 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 error | SSL 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. |