---
title: "DRDA/DB2 Protocol Documentation"
---

# DRDA/DB2 Protocol Documentation

:::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.
:::

This directory contains consolidated documentation for HeliosDB's IBM DB2 DRDA protocol support.

## Quick Start

Connect to HeliosDB using DB2 client tools:

```bash
# DB2 CLP connection
db2 connect to heliosdb user admin using password

# Execute query
db2 "SELECT * FROM employees FETCH FIRST 10 ROWS ONLY"
```

## Contents

| File | Description |
|------|-------------|
| **README.md** | Overview and quick start (this file) |
| **CONFIGURATION.md** | Connection and protocol configuration |
| **COMPATIBILITY.md** | DRDA/DB2 feature compatibility |
| **EXAMPLES.md** | DB2 SQL examples |

## Feature Overview

### DRDA Protocol Support

HeliosDB implements the Distributed Relational Database Architecture (DRDA) protocol for DB2 compatibility:

| Feature | Result | Notes |
|---------|--------|-------|
| DRDA Level 3 | 100% | Full implementation |
| DRDA Level 4 | 100% | Extended features |
| DRDA Level 5 | 90% | Advanced features |
| Authentication | 100% | Password, Kerberos |
| Encryption | 100% | SSL/TLS |

### DB2 SQL Compatibility

| Feature | Coverage | Notes |
|---------|----------|-------|
| SQL Statements | 95% | Standard DB2 syntax |
| Data Types | 100% | All DB2 types |
| Built-in Functions | 90% | Core functions |
| Stored Procedures | 85% | SQL procedures |
| Triggers | 100% | All trigger types |

## Connection Parameters

| Parameter | Default | Description |
|-----------|---------|-------------|
| `host` | localhost | Server hostname |
| `port` | 50000 | DRDA port |
| `database` | heliosdb | Database name |
| `user` | - | Username |
| `password` | - | Password |

## Driver Compatibility

| Driver | Version | Result |
|--------|---------|--------|
| IBM DB2 Driver | 11.5+ | Full |
| JDBC Type 4 | 4.x | Full |
| ODBC | 11.x | Full |
|.NET Provider | 11.x | Full |
| Python ibm_db | 3.x | Full |

## DB2 SQL Features

### Supported Statements

- SELECT with FETCH FIRST
- INSERT, UPDATE, DELETE
- MERGE statements
- Common Table Expressions (CTEs)
- Recursive queries
- OLAP functions

### DB2-Specific Syntax

```sql
-- FETCH FIRST
SELECT * FROM employees FETCH FIRST 10 ROWS ONLY;

-- WITH UR (uncommitted read)
SELECT * FROM employees WITH UR;

-- OFFSET/FETCH
SELECT * FROM employees
ORDER BY emp_id
OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY;
```

## Related Documentation

- **[CONFIGURATION.md](https://www.heliosdb.com/docs/full/reference/protocols/drda/configuration/)** - Connection configuration
- **[COMPATIBILITY.md](https://www.heliosdb.com/docs/full/reference/protocols/drda/compatibility/)** - Feature compatibility
- **[EXAMPLES.md](https://www.heliosdb.com/docs/full/reference/protocols/drda/examples/)** - SQL examples
- **[Parent Directory](https://www.heliosdb.com/docs/full/reference/protocols/readme/)** - Protocol overview
