# DB2 DB2 Troubleshooting

Source: https://userguide.qualytics.io/source-datastore/datastore/jdbc/db2/troubleshooting/

When **Test connection** or an operation fails on a DB2 datastore, the DB2 error code (`SQLxxxxN`) points to the layer that failed: the credentials, the grants, the connection, or the certificate.

> **Info: Problems every connector shares**
>
> A server that cannot be reached, a red status dot, a credential changed at the source, Secrets Management errors, an empty schema list, missing tables, and a blocked deletion are covered on [Source Datastore Troubleshooting](https://userguide.qualytics.io/source-datastore/datastore/troubleshooting/). This page covers the errors specific to DB2.

## Common Errors

| Error | Likely Cause | Fix |
| --- | --- | --- |
| `SQL30082N: Security processing failed` | Incorrect username or password | Verify the credentials and ensure the user exists in the DB2 instance |
| `SQL1060N: User does not have the CONNECT privilege` | The user lacks `CONNECT` on the database | Run `GRANT CONNECT ON DATABASE TO USER <user>` |
| `SQL0551N: User does not have the required authorization` | The user lacks `SELECT` or other required permissions on a table | Grant the missing permission on the specific table or schema |
| `SQL0204N: Name is an undefined name` | The schema or table does not exist, or the user cannot see it | Verify the schema name matches exactly (DB2 stores unquoted schema names in uppercase by default) |
| `SQL0552N: User is not authorized to perform the requested command` | The enrichment user lacks `CREATETAB` or `CREATEIN` | Run `GRANT CREATETAB ON DATABASE TO USER <user>` and `GRANT CREATEIN ON SCHEMA <schema_name> TO USER <user>` |

## Detailed Notes

### Authentication Errors

The error `SQL30082N: Security processing failed` indicates that the credentials are incorrect.

Common causes:

- **Incorrect password**: the password does not match the one set for the user.
- **User does not exist**: the username was misspelled or does not exist in the DB2 instance.
- **Authentication plugin mismatch**: the DB2 server uses a different authentication mechanism than expected (e.g., Kerberos, LDAP).

> **Note**
>
> DB2 authentication is handled at the operating system or LDAP level, not within the database itself. Ensure the credentials match the OS or LDAP user account.

### Permission Errors

The error `SQL0551N: User does not have the required authorization` means the user authenticated successfully but lacks the necessary grants.

Common causes:

- **Missing `SELECT` on tables**: the user does not have `SELECT` on the target tables in the schema.
- **Missing `CONNECT` on database**: the user cannot connect to the database.
- **Missing `USAGE` on schema**: the user cannot access objects within the schema.
- **System catalog access**: the user lacks `SELECT` access to `SYSCAT.SCHEMATA` or `SYSCAT.TABLES` needed for schema discovery.

### Connection Errors

The error `SQL1060N: User does not have the CONNECT privilege` means the user lacks the `CONNECT` privilege on the database.

Common causes:

- **Missing `CONNECT` grant**: `GRANT CONNECT ON DATABASE TO USER <user>` was not executed.
- **Database not cataloged**: the target database is not cataloged on the DB2 client.
- **Network issues**: a firewall is blocking connections on the DB2 port (default 50000).

### Certificate and TLS Errors

A connection that fails while negotiating TLS, rather than at sign-in, usually means Qualytics does not trust the certificate the DB2 server presents. This can happen after a platform upgrade stops trusting a root certificate your server's chain depends on, even though nothing changed on the DB2 side.

Paste the server's signing chain into **TLS Certificate Chain**, in the collapsed **Advanced** section of the connection form, and check the following:

- **The whole chain**: include the server certificate and every intermediate, each as its own `-----BEGIN CERTIFICATE-----` block. A missing intermediate leaves the chain incomplete and the connection still fails.
- **The format**: the field takes PEM text only, up to 256 KiB. A larger value is rejected.
- **The scope**: the chain applies to that one connection. Datastores reached through other connections are unaffected, and each connection that needs a chain gets its own.

*Last updated: November 17, 2026.*
