IBM Db2 in n8n: A Docker-Distributed SQL Builder Node

IBM Db2 in n8n is a harder problem than most databases: Db2's official driver, ibm_db, is a native addon that needs a compile toolchain and the Db2 CLI driver on the host. n8n's community-node installer can't preinstall that, so Db2 support for n8n ships a different way — as a Docker image with everything already built in.

What it is

n8n-nodes-db2-sql-builder is an n8n community node built on @foxschema/core, the same engine behind FoxSchema's schema comparison and migration SQL generation. Rather than being installed through n8n's Community Nodes UI, it's distributed as a Docker image — 5nickels/n8n-nodes-db2-sql-builder — with the Db2 driver baked in at build time, so there's no native compile step for you to hit.

Running it

docker pull 5nickels/n8n-nodes-db2-sql-builder:latest

For local development against a sibling FoxSchema checkout, the repo's compose setup builds with context: .. so the image can bundle @foxschema/core directly:

# Layout:
#   ../foxSchema/
#   ./n8n-nodes-db2-sql-builder/

cp .env.example .env
docker compose up -d --build
# n8n UI at http://localhost:5678

What the node does

Once an IBM DB2 credential is configured (host, database, user, password, port — 50000 by default — protocol/SSL, and schema, defaulting to DB2INST1), the node covers the same ground as FoxSchema's other n8n node, applied to Db2:

  • Catalog browse — tables, views, procedures, and functions via FoxSchema's Db2 provider, the same introspection logic used for Db2 schema diffs.
  • Row operations — Get / Create / Update / Delete with visual SELECT, WHERE, GROUP BY, HAVING, ORDER BY, and Db2's FETCH FIRST.
  • Routine operations — Call Procedure or Call Function, with Form, From Item, or JSON parameter modes.
  • Execute Query — multi-statement SQL with bindings, preview/dry-run, and transactions.

All identifiers are validated and schema-qualified, and Allow Unsafe SQL is off by default — raw SQL expressions and SQL-typed bind parameters need it explicitly enabled before they'll run.

A typical workflow

A common shape: a Schedule Trigger kicks off a nightly run, an Execute Query step pulls a batch of rows out of a Db2 warehouse table with a WHERE clause bound to yesterday's date, and a Call Procedure step feeds each row into an existing Db2 stored procedure that already encodes the business logic for posting a transaction — no need to reimplement that logic in n8n, and no need to hand-write the parameter binding for the call. Because OUT parameters aren't captured back into the workflow yet, a procedure that reports success/failure per row is easier to wire up than one you need a return value from; for those, a Split in Batches step calling the procedure once per row keeps each call isolated in the workflow log.

Other dialects, same workflow shape

This package is Db2-specific by design. If a workflow needs PostgreSQL, MySQL, MariaDB, SQL Server, or Oracle instead — or alongside Db2 in the same n8n instance — n8n-nodes-fox-schema-sql-builder covers those five as a regular npm-installable community node, no Docker required. Both nodes share the same FoxSchema-powered design: same catalog browser shape, same row-operation builder, same routine-call modes. Which package you reach for is just a question of which dialect you're connecting to.

Get started

Source and full setup instructions are on GitHub. To see the same Db2 catalog and migration engine outside of n8n, check the FoxSchema docs or self-host FoxSchema directly.

Scroll to Top