Skip to main content

ArpeDb2 — Compatibility

Which IBM Db2 families, versions and client platforms ArpeDb2 is known to work with. Three support states are used across the Arpeio driver family:

StateMeaning
✅ ValidatedTested directly against this target before release.
🟢 SupportedExpected to work and covered by the same protocol surface, but not run continuously. Report issues and they will be treated as bugs.
🟡 Not yet validatedShould be compatible on protocol grounds, but unverified. No promise yet.

ArpeDb2 speaks the DRDA wire protocol natively over TCP (with optional TLS), without a Db2 client, CLI/ODBC or JCC. The type mapping is in Data types.


Db2 families​

DRDA is one protocol for three Db2 families, which differ in catalog, type mapping and text encoding. The driver recognises the family from the product identifier the server sends at connect.

FamilyStateNotes
Db2 for LUW (Linux, UNIX, Windows)✅ ValidatedThe full feature set.
Db2 for i (IBM i, AS/400)✅ Validated on IBM i 7.5Queries, DML, bound parameters, bulk ingest, CALL, metadata and statistics. See Db2 for i. Since v0.3.3.
Db2 for z/OS❌ Not supportedNot implemented yet.

Db2 for LUW versions​

VersionStateNotes
Db2 12.1✅ ValidatedIncluding VECTOR columns (12.1.2 and later).
Db2 11.5🟢 SupportedSame DRDA surface and type set as the validated version.
Db2 11.1 and earlier🟡 Not yet validatedOlder DRDA levels; untested.

Db2 for i​

Validated on IBM i 7.5. What to know before you connect:

  • Port. The DRDA server of IBM i listens on 446, and on 448 for TLS. Set adbc.arpedb2.port accordingly.
  • Package. Every statement runs in a DRDA package, and IBM i has none until a client binds it. The driver binds its package once, in your job's current library, the first time it is needed. Binding needs the authority to create objects in that library. See Packages.
  • Text. CHAR and VARCHAR columns arrive in each column's CCSID (EBCDIC, including the Japanese, Chinese and Korean code pages) and are converted to UTF-8. See Character.
  • Types. The built-in Db2 for i types all read. The differences from Db2 for LUW (BOOLEAN, ROWID, DATALINK, NUMERIC, decimals wider than 31 digits) are in Data types.
  • Isolation level. The four ADBC levels and default work, each through its own package. See Isolation level.
  • Writes to a table that is not journaled fail with SQLCODE -7008 under every isolation level but no-commit. Set the isolation level to adbc.arpedb2.transaction.isolation.no_commit, add WITH NC to the statement, or journal the table. See Troubleshooting.
  • Metadata on a shared system. GetObjects and GetStatistics read the QSYS2 catalog and list only the libraries you can see. The system libraries (QSYS, QSYS2, SYSIBM, SYSIBMADM, SYSPROC, SYSTOOLS) are left out unless the db_schema filter names one exactly. An unfiltered call still reads every library you can see: pass a schema filter.
  • Statistics. The row count comes from QSYS2.SYSTABLESTAT, which the system keeps current. Null and distinct counts come from QSYS2.SYSCOLUMNSTAT, which only has rows for columns the system has collected statistics on.

Authentication methods​

MethodPlatformState
User and passwordall✅ Validated
Encrypted user and password (AES or DES)all✅ Validated, against Db2 12.1 SERVER_ENCRYPT and Db2 for i
KerberosLinux✅ Validated. MIT Kerberos is loaded from the host.
KerberosWindows (SSPI)🟡 Not yet validated against Active Directory
Token or API key as the password, over verified TLSall🟢 Supported
TLS 1.2 / 1.3 (require, verify-ca, verify-full)all✅ Validated
Client certificates (mutual TLS)—❌ Not supported

See Authentication for the setup of each.


Client platforms​

PlatformStateNotes
Linux x64✅ ValidatedSelf-contained .so: OpenSSL is linked in. glibc 2.28 or newer (RHEL 8, Rocky 8 and later distributions).
Windows x64🟢 SupportedSelf-contained .dll: OpenSSL is linked in, and TLS trusts the Windows certificate store.
macOS, Linux arm64❌ Not supportedNo released binary.

ADBC conformance​

ArpeDb2 implements the ADBC 1.1.0 API and passes the upstream ADBC driver validation suite with no failure. The tests it does not run are Db2 limitations or calls the driver reports as not implemented.

AreaState
ExecuteQuery, ExecuteUpdateImplemented. Large results stream with bounded memory.
ExecuteSchemaImplemented, without running the query.
Prepare, Bind, BindStreamImplemented for queries and DML. A query takes one parameter row; DML takes many, sent many rows per round trip.
GetParameterSchemaImplemented: the types the server describes for each ?.
Stored proceduresCALL with IN, OUT and INOUT parameters (LOBs included) and several result sets. See Examples.
Bulk ingestcreate, append, replace, create_append, a target schema, temporary tables. See Bulk ingest.
TransactionsAutocommit on by default, Commit, Rollback, isolation levels. See Transactions.
Cancel (statement and connection)Implemented. The connection must be reopened afterwards: see Cancelling a request.
GetInfoImplemented.
GetObjectsImplemented, with LIKE pattern filters. Constraints: PRIMARY KEY, UNIQUE, FOREIGN KEY and CHECK. System schemas are left out unless the db_schema filter names one exactly.
GetTableSchemaImplemented, with the same mapping and ARPEDB2:type metadata as a query.
GetTableTypesImplemented.
GetStatistics, GetStatisticNamesRow, null and distinct counts from the catalog statistics, marked approximate, or exact counts with approximate=false. On Db2 for LUW the catalog statistics are filled by RUNSTATS.
Current schemaReadable and settable through adbc.connection.db_schema.
ExecutePartitions, ReadPartition❌ Not supported.
Substrait plans❌ Not supported.

Bulk ingest​

Ingest uses the standard ADBC options (adbc.ingest.target_table, adbc.ingest.target_db_schema, adbc.ingest.mode, adbc.ingest.temporary) on a statement with data bound by Bind or BindStream, and sends the rows as parameterised INSERT requests of up to 1000 rows each. The column types it creates are in Data types → Ingest.

  • Under autocommit, the load is one unit of work, committed at the end, or every adbc.arpedb2.ingest.commit_interval_rows rows. A load that fails is rolled back, except for the rows such an interval already committed.
  • With autocommit off, the load joins your transaction, DDL included: a Rollback undoes the rows and the CREATE TABLE or DROP TABLE of the load. A failed load rolls back to a savepoint and leaves your earlier work in the transaction untouched.
  • replace drops the existing table only after it has checked that the new one can be created: a column type the driver cannot create leaves the existing table as it was.
  • Temporary ingest creates a declared global temporary table in SESSION. It needs a user temporary table space and cannot be combined with adbc.ingest.target_catalog or adbc.ingest.target_db_schema.
  • Parallel loads into one table need ingest.commit_interval_rows: see Parallel loads.
  • Bad rows can be set aside instead of failing the load: see Rejected rows.

Errors​

A Db2 error carries the SQLCODE as the vendor code and the SQLSTATE of the server. The ADBC status is chosen from the SQLSTATE:

SQLSTATEExampleADBC status
42704, 42703, 42883, 42884SQLCODE -204 (undefined name), -206 (undefined column), -440 (no such routine)NOT_FOUND
42710SQLCODE -601 (object already exists)ALREADY_EXISTS
42501SQLCODE -551 (not authorized)UNAUTHORIZED
42xxx, otherSQLCODE -104 (syntax)INVALID_ARGUMENT
23xxxSQLCODE -803 (duplicate key), -407 (NULL in a NOT NULL column)INTEGRITY
22xxxSQLCODE -802 (arithmetic overflow), -302 (value too large)INVALID_DATA
28xxxwrong user or passwordUNAUTHENTICATED
08xxxconnection lostIO
57014SQLCODE -952 (processing cancelled)CANCELLED
40001SQLCODE -911 (deadlock or lock timeout: the transaction was rolled back, retry it)UNKNOWN

The SQLCODE and SQLSTATE are also set on an error raised while a result is being read, so retry logic can rely on them.

See also​