libredb / libredb/libredb-studio

[FEATURE] Add IBM Db2 LUW provider

Open
#786 14 comments 1 reaction 1 assignee Claimed by @nycjay View on GitHub
core-capabilities enhancement security
Dominant language
TypeScript
Stars
726
Forks
119
Avg merge
7h 47m
Merged PRs (30d)
265

Description

## Is your feature request related to a problem?
The "problem" is that there's no way to use libredb-studio to connecto to IBM Db2 LUW. It's a common enterprise database, and right now the only option is to point some other SQL client at it.

## Describe the solution you'd like
A db2 provider that connects over the DRDA protocol using the native `ibm_db` driver.

Db2's SQL is close to Oracle's: double-quoted identifiers, and `FETCH FIRST` / `OFFSET ... FETCH NEXT` pagination. So it fits the existing SQL provider base with a small amount of dialect-specific work, mostly around paging.

I'd scope the first version to browsing schema, running queries with paging, inline row edits, and per-table maintenance (`RUNSTATS` and `REORG`). `EXPLAIN` would be left out of the first cut: Db2's `EXPLAIN` writes to explain tables rather than returning a plan for a single statement, so it's worth doing as its own change, the same way MSSQL shipped without it (#126).

## Describe alternatives you've considered
The Db2 REST /execsql endpoint, which would need no native dependency. I ruled it out: the REST service is deployed separately from the engine and is commonly turned off, so a lot of installs couldn't use it. `ibm_db` connects straight to the engine and also works in air-gapped setups where REST isn't running. The cost is a native add-on with an install-time driver download.

## Use Case
Someone running Db2 LUW in-house wants to browse tables, run queries with paging, edit a row inline, and run `RUNSTATS` or `REORG` on a table, without leaving the app for a separate Db2 client.

## Additional Context
I've built and tested this against a live Db2 v11.5.9.0 server and will open a PR.

## Implementation Notes (Optional)

## Related Issues

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.