Db2 for i
Prepare IBM i tables and journals, connect a Db2 for i source, and validate snapshot and CDC results with tapstate.
Connector profile
- Category
- Databases
- Guide maturity
- GAStable guide and configuration contract
- Role in this guide
- Source
- Capabilities
- SnapshotCDCSchema discovery
- Compatibility
- IBM i 7.4+ · Source-only (JTOpen); requires connector registration
Before you begin
Db2 for i (db2i) is a separately registered source-only connector covering
the database built into IBM i (formerly AS/400). It is not pre-bundled in the
default Cloud connector set or local playground. For Db2 LUW, use
Db2. db2i cannot be used as a sync target.
- Confirm
db2iavailability on your Cluster with support before preparing tables. - Allow your Cluster's outbound address to reach the required IBM i host services.
- Use the v0.8 CLI and server and
register
db2ifrom the publishedconnectors-previewrelease before creating a connection (Register and test connectors).
The JAR bundles JTOpen 21.0.5 under the IBM Public License 1.0. Connector use remains subject to the applicable commercial connector agreement. Use an independent test library to check your IBM i version, values, and recovery behavior before connecting application data.
Source
Choose the outcome you need. Each tab contains the network, account, and permissions required for that mode. Configure TLS separately below when needed.
TLS connections
Have the IBM i administrator enable TLS for the host services you use and provide the server's CA certificate. The tapstate operator must configure trust on the server that runs the connector, including the Java truststore used by JTOpen. Import only the CA you intend to trust, for example:
keytool -importcert -alias db2i-ca -file db2i-ca.cer \
-keystore db2i-trust.p12 -storetype PKCS12The command prompts for the truststore password. Configure that truststore and
its password securely in the connector runtime. Set secure=true through
extParams for an encrypted JDBC connection and select the TLS database port.
JTOpen's tls truststore and tls truststore password properties can select a
custom store; do not put its password in a committed resource, screenshot, or
support bundle. Verify the journal connection's host-service TLS configuration
as well as the JDBC connection before relying on it.
Create a connection
In the web application (once db2i is registered on the server), choose
Db2 for i and enter the prepared host, library, account, and journal
settings. For file-based authoring, use this Source resource:
version: tapstate/v1
kind: source
id: ibmi_orders
connector: db2i
mode: cdc
config:
host: ibmi.internal
port: 8471
database: APPDATA
user: ${DB2I_USER}
password: ${DB2I_PASSWORD}
journalLibraryName: APPDATA
journalName: QSQJRN
tables:
- ORDERSdatabase selects the data library. Use the names returned by discovery and
check the relationship between SQL names and IBM i system names on your system.
For a bounded copy, set mode: snapshot. The pipeline's
settings.read_mode determines whether a
CDC-capable source runs an initial load, follows changes, or does both.
Validate the configuration
Save the resource under a workspace's source/ directory, then validate it:
tapstate validate --workdir tapstate-workvalid: 3 resources in tapstate-workThe resource shape, references, and applicable catalog rules were accepted. Runtime availability was not checked.
invalid: orders_source.tap.yml:12:1 dsl.unknown-field
Unknown field 'unexpected' at unexpected.Use the filename, location, diagnostic code, and suggested fix to update the resource.
Next, run the connection in a non-production environment and confirm credentials, network access, permissions, and a representative read or write.
Local validation checks resource shape. It does not contact IBM i or verify journal permissions and receiver history. In an authenticated CLI session for that workspace, register, apply, test, and discover:
register db2i
apply
test ibmi_orders -o json
discover-schema ibmi_orders -o json
schema ibmi_orders -o jsonResolve failed test items before starting. Confirm discovery contains the selected tables, columns, and keys. A passed connection test alone does not verify snapshot correctness, journal delivery, or restart continuation.
Build a small pipeline into an independent target. Compare initial counts and
keyed values, then test an insert, changed-value update, and delete. Stop the
pipeline with state retained, wait for STOPPED, make a controlled source
change, then start the pipeline and check that the change reaches the target.
See Build a pipeline and
Observe a pipeline.
Limitations
- Source only: a
serve.synctarget usingdb2iis refused in both deployment modes. Registering the connector does not enable target writes. - CDC carries INSERT, UPDATE, and DELETE, not DDL changes. Rediscover and validate schema changes before continuing a workload.
- Snapshot reads large-object values in full; journal CDC does not carry their values. Validate workloads that include LOB columns before using CDC.
- Journal reads add database CPU, I/O, and network load. Monitor receiver retention and free space, and validate recovery before removing receivers.
- A successful snapshot does not prove that the selected files are correctly journaled for continued capture.
Reference
Connection settings
| Field | Required | Default | Description |
|---|---|---|---|
host | Yes | — | IBM i host reachable from the tapstate server. |
port | No | 8471 | Database service port; use your configured TLS port for TLS. |
database | Yes | — | Data library used for discovery and reads. |
user | For authenticated access | — | IBM i user profile. |
password | For password authentication | — | Account password; a secret field. |
journalName | For CDC | QSQJRN when omitted | Journal object name. |
journalLibraryName | For CDC | Data library when omitted | Library containing the journal. |
extParams | No | — | Additional JTOpen JDBC properties, such as secure=true. |
ignoreTransaction | No | false | Transaction-handling option; retain the default unless you have validated the alternative with your workload. |
pollingInterval | No | 0 | Additional delay between journal polls, in seconds. |
journalBufferSize | No | 128 KiB | Journal fetch buffer size in KiB. Omitted values and values at or below 32 use 128 KiB; normally leave this unset. |
enableDebug | No | false | Additional connector diagnostics; review output before sharing it. |
timezone | No | Empty | Connector time-zone selection; the catalog offers whole-hour offsets from -11:00 to +14:00. |
Data compatibility
Evaluate representative CHAR/VARCHAR, SMALLINT/INTEGER/BIGINT, REAL/DOUBLE, DECIMAL/NUMERIC/DECFLOAT, DATE/TIME/TIMESTAMP, and any binary or large-object columns in your schema. Check decimal precision and temporal values in both snapshot and CDC output.