---
title: "DRDA/DB2 Compatibility Matrix"
---

# DRDA/DB2 Compatibility Matrix

:::caution[Planned: not in the current release]
DB2 (DRDA) protocol support for HeliosDB Full is planned. The current release opens no DRDA listener. Reach
the same data over the PostgreSQL listener or `POST /api/v1/query` today. This page
describes the planned interface.
:::

Comprehensive compatibility reference for HeliosDB's IBM DB2 DRDA protocol implementation.

## Planned Coverage (design target: 95%)

| Category | Design coverage | Planned scope |
|----------|----------|--------|
| DRDA Protocol | 95% | Level 5 |
| SQL Language | 95% | DB2 syntax |
| Data Types | 100% | All DB2 types |
| Stored Procedures | 85% | SQL procedures |

## DRDA Protocol Support

### Protocol Levels

| Level | Coverage | Features |
|-------|----------|----------|
| Level 3 | 100% | Basic operations |
| Level 4 | 100% | Extended features |
| Level 5 | 90% | Advanced features |

### DRDA Commands

| Command | Result | Notes |
|---------|--------|-------|
| ACCRDB | Supported | Access database |
| ACCRDBRM | Supported | Access reply |
| EXCSAT | Supported | Exchange attributes |
| EXCSATRD | Supported | Exchange reply |
| SECCHK | Supported | Security check |
| SECCHKRM | Supported | Security reply |
| PRPSQLSTT | Supported | Prepare statement |
| EXCSQLSTT | Supported | Execute statement |
| OPNQRY | Supported | Open query |
| CNTQRY | Supported | Continue query |
| CLSQRY | Supported | Close query |
| SQLSTT | Supported | SQL statement |

## SQL Language Support

### Data Definition (DDL)

| Statement | Result | Notes |
|-----------|--------|-------|
| CREATE TABLE | Supported | All options |
| CREATE INDEX | Supported | |
| CREATE VIEW | Supported | |
| CREATE SEQUENCE | Supported | |
| CREATE PROCEDURE | Supported | SQL procedures |
| CREATE FUNCTION | Supported | SQL functions |
| CREATE TRIGGER | Supported | |
| ALTER TABLE | Supported | |
| DROP * | Supported | All objects |
| TRUNCATE | Supported | |
| COMMENT | Supported | |

### Data Manipulation (DML)

| Statement | Result | Notes |
|-----------|--------|-------|
| SELECT | Supported | Full DB2 syntax |
| INSERT | Supported | |
| UPDATE | Supported | |
| DELETE | Supported | |
| MERGE | Supported | |
| TRUNCATE | Supported | |

### DB2-Specific Syntax

| Feature | Result | Notes |
|---------|--------|-------|
| FETCH FIRST N ROWS | Supported | |
| WITH UR/CS/RS/RR | Supported | Isolation levels |
| OFFSET... FETCH | Supported | Pagination |
| FOR UPDATE | Supported | Row locking |
| OPTIMIZE FOR N ROWS | Supported | Query hints |
| WITH HOLD | Supported | Cursor hold |

### Common Table Expressions (CTEs)

| Feature | Result | Notes |
|---------|--------|-------|
| Basic CTE | Supported | WITH clause |
| Recursive CTE | Supported | WITH RECURSIVE |
| Multiple CTEs | Supported | |
| CTE in INSERT | Supported | |
| CTE in UPDATE | Supported | |
| CTE in DELETE | Supported | |

## Data Types

### Numeric Types

| Type | Result | Notes |
|------|--------|-------|
| SMALLINT | Supported | 2-byte integer |
| INTEGER | Supported | 4-byte integer |
| BIGINT | Supported | 8-byte integer |
| DECIMAL | Supported | Fixed precision |
| NUMERIC | Supported | Same as DECIMAL |
| REAL | Supported | 4-byte float |
| DOUBLE | Supported | 8-byte float |
| DECFLOAT | Supported | Decimal float |

### String Types

| Type | Result | Notes |
|------|--------|-------|
| CHAR | Supported | Fixed length |
| VARCHAR | Supported | Variable length |
| CLOB | Supported | Character LOB |
| GRAPHIC | Supported | Double-byte |
| VARGRAPHIC | Supported | Variable double-byte |
| DBCLOB | Supported | Double-byte CLOB |

### Binary Types

| Type | Result | Notes |
|------|--------|-------|
| BLOB | Supported | Binary LOB |
| BINARY | Supported | Fixed binary |
| VARBINARY | Supported | Variable binary |

### Date/Time Types

| Type | Result | Notes |
|------|--------|-------|
| DATE | Supported | Calendar date |
| TIME | Supported | Time of day |
| TIMESTAMP | Supported | Date and time |

### Special Types

| Type | Result | Notes |
|------|--------|-------|
| XML | Partial | Basic support |
| ROW | Supported | Composite type |
| BOOLEAN | Supported | DB2 11.1+ |

## Functions

### String Functions

| Function | Result | Notes |
|----------|--------|-------|
| SUBSTR | Supported | Substring |
| LENGTH | Supported | String length |
| CONCAT | Supported | Concatenation |
| UPPER | Supported | Uppercase |
| LOWER | Supported | Lowercase |
| TRIM | Supported | Trim whitespace |
| LTRIM | Supported | Left trim |
| RTRIM | Supported | Right trim |
| LEFT | Supported | Left substring |
| RIGHT | Supported | Right substring |
| LOCATE | Supported | Find position |
| REPLACE | Supported | Replace string |
| COALESCE | Supported | First non-null |
| NULLIF | Supported | Null if equal |

### Numeric Functions

| Function | Result | Notes |
|----------|--------|-------|
| ABS | Supported | Absolute value |
| CEIL/CEILING | Supported | Round up |
| FLOOR | Supported | Round down |
| ROUND | Supported | Round |
| TRUNCATE | Supported | Truncate |
| MOD | Supported | Modulo |
| POWER | Supported | Power |
| SQRT | Supported | Square root |
| SIGN | Supported | Sign |
| RAND | Supported | Random |

### Date/Time Functions

| Function | Result | Notes |
|----------|--------|-------|
| CURRENT DATE | Supported | Current date |
| CURRENT TIME | Supported | Current time |
| CURRENT TIMESTAMP | Supported | Current timestamp |
| DATE | Supported | Extract date |
| TIME | Supported | Extract time |
| TIMESTAMP | Supported | Create timestamp |
| YEAR | Supported | Extract year |
| MONTH | Supported | Extract month |
| DAY | Supported | Extract day |
| HOUR | Supported | Extract hour |
| MINUTE | Supported | Extract minute |
| SECOND | Supported | Extract second |
| DAYS | Supported | Days between |
| TIMESTAMPDIFF | Supported | Time difference |

### Aggregate Functions

| Function | Result | Notes |
|----------|--------|-------|
| COUNT | Supported | |
| SUM | Supported | |
| AVG | Supported | |
| MIN | Supported | |
| MAX | Supported | |
| STDDEV | Supported | |
| VARIANCE | Supported | |
| LISTAGG | Supported | String aggregation |

### OLAP Functions

| Function | Result | Notes |
|----------|--------|-------|
| ROW_NUMBER | Supported | |
| RANK | Supported | |
| DENSE_RANK | Supported | |
| NTILE | Supported | |
| LAG | Supported | |
| LEAD | Supported | |
| FIRST_VALUE | Supported | |
| LAST_VALUE | Supported | |
| SUM OVER | Supported | Running sum |
| AVG OVER | Supported | Running average |

## Stored Procedures

| Feature | Result | Notes |
|---------|--------|-------|
| SQL Procedures | Supported | |
| IN Parameters | Supported | |
| OUT Parameters | Supported | |
| INOUT Parameters | Supported | |
| Result Sets | Supported | |
| CALL Statement | Supported | |
| Dynamic SQL | Supported | |
| Exception Handling | Supported | |

## Triggers

| Feature | Result | Notes |
|---------|--------|-------|
| BEFORE Triggers | Supported | |
| AFTER Triggers | Supported | |
| INSTEAD OF Triggers | Supported | |
| Row Triggers | Supported | |
| Statement Triggers | Supported | |
| Transition Tables | Supported | |

## Transaction Control

| Statement | Result | Notes |
|-----------|--------|-------|
| COMMIT | Supported | |
| ROLLBACK | Supported | |
| SAVEPOINT | Supported | |
| RELEASE SAVEPOINT | Supported | |
| SET TRANSACTION | Supported | |

## Driver Compatibility

### JDBC

| Driver | Version | Result |
|--------|---------|--------|
| IBM DB2 Driver | 11.5+ | Full |
| JDBC Type 4 | 4.x | Full |

### ODBC

| Driver | Version | Result |
|--------|---------|--------|
| IBM DB2 ODBC | 11.x | Full |

### Python

| Driver | Version | Result |
|--------|---------|--------|
| ibm_db | 3.x | Full |
| ibm_db_sa (SQLAlchemy) | 0.3+ | Full |

###.NET

| Driver | Version | Result |
|--------|---------|--------|
| IBM.Data.DB2 | 11.x | Full |
| IBM.Data.DB2.Core | 3.x | Full |

## Known Limitations

### Not Supported

| Feature | Reason |
|---------|--------|
| External Procedures | Use SQL procedures |
| DB2 Connect | Direct connection only |
| Federation | Use HeliosDB federation |
| MQT | Use materialized views |

### Behavioral Differences

1. **Catalog**: Uses HeliosDB catalog structure
2. **Bufferpool**: Different memory management
3. **Tablespaces**: Abstracted by HeliosDB
4. **Logging**: Uses HeliosDB WAL

---

**Related**: [README.md](https://www.heliosdb.com/docs/full/reference/protocols/drda/readme/) | [CONFIGURATION.md](https://www.heliosdb.com/docs/full/reference/protocols/drda/configuration/) | [EXAMPLES.md](https://www.heliosdb.com/docs/full/reference/protocols/drda/examples/)
