DRDA/DB2 Configuration Guide
Comprehensive configuration reference for HeliosDB’s IBM DB2 DRDA protocol support.
Connection Configuration
DB2 CLP Connection
# Catalog remote database
db2 catalog tcpip node HELIOS remote localhost server 50000
db2 catalog database heliosdb at node HELIOS
db2 connect to heliosdb user admin using password
Connection String
jdbc:db2://localhost:50000/heliosdb
Connection Parameters
| Parameter | Type | Default | Description |
|---|
host | string | localhost | Server hostname |
port | int | 50000 | DRDA protocol port |
database | string | heliosdb | Database name |
user | string | - | Username |
password | string | - | Password |
currentSchema | string | - | Default schema |
securityMechanism | int | 3 | Security mechanism |
JDBC Configuration
Basic Connection
String url = "jdbc:db2://localhost:50000/heliosdb";
Properties props = new Properties();
props.put("user", "admin");
props.put("password", "password");
Connection conn = DriverManager.getConnection(url, props);
Connection Pool (HikariCP)
HikariConfig config = new HikariConfig();
config.setJdbcUrl("jdbc:db2://localhost:50000/heliosdb");
config.setUsername("admin");
config.setPassword("password");
config.setMaximumPoolSize(10);
config.addDataSourceProperty("currentSchema", "myschema");
config.addDataSourceProperty("progressiveStreaming", "2");
HikariDataSource ds = new HikariDataSource(config);
JDBC Properties
| Property | Type | Default | Description |
|---|
currentSchema | string | - | Default schema |
progressiveStreaming | int | 2 | LOB streaming mode |
queryTimeout | int | 0 | Query timeout (seconds) |
commandTimeout | int | 0 | Command timeout |
securityMechanism | int | 3 | Security type |
traceLevel | int | 0 | JDBC trace level |
Python (ibm_db) Configuration
Basic Connection
conn = ibm_db.connect(conn_str, "", "")
Connection Options
"CURRENTSCHEMA=myschema;"
"QUERYOPTS=OPTIMIZE FOR 100 ROWS;"
Security Configuration
Password Authentication
props.put("securityMechanism", "3");
props.put("user", "admin");
props.put("password", "password");
Encrypted Password
// Encrypted user ID and password
props.put("securityMechanism", "9");
props.put("user", "admin");
props.put("password", "password");
Kerberos Authentication
props.put("securityMechanism", "11");
props.put("KerberosServerPrincipal", "db2/server@REALM");
Security Mechanisms
| Code | Name | Description |
|---|
| 3 | CLEAR_TEXT_PASSWORD | Clear text password |
| 7 | ENCRYPTED_PASSWORD | Encrypted password only |
| 9 | ENCRYPTED_USER_AND_PASSWORD | Both encrypted |
| 11 | KERBEROS | Kerberos authentication |
SSL/TLS Configuration
JDBC with SSL
String url = "jdbc:db2://localhost:50000/heliosdb:sslConnection=true;";
props.put("sslTrustStoreLocation", "/path/to/truststore.jks");
props.put("sslTrustStorePassword", "password");
SSL Properties
| Property | Description |
|---|
sslConnection | Enable SSL (true/false) |
sslTrustStoreLocation | Path to truststore |
sslTrustStorePassword | Truststore password |
sslKeyStoreLocation | Path to keystore |
sslKeyStorePassword | Keystore password |
DRDA Protocol Settings
Protocol Level Configuration
| Setting | Values | Description |
|---|
| Level 3 | Basic | Standard operations |
| Level 4 | Extended | Stored procedures |
| Level 5 | Advanced | All features |
Flow Control
props.put("blockingReadConnectionTimeout", "30");
props.put("maxRetriesOnError", "3");
Isolation Levels
Configuration
conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
DB2 Isolation Levels
| JDBC Level | DB2 Syntax | Description |
|---|
| READ_UNCOMMITTED | WITH UR | Uncommitted read |
| READ_COMMITTED | WITH CS | Cursor stability |
| REPEATABLE_READ | WITH RS | Read stability |
| SERIALIZABLE | WITH RR | Repeatable read |
SQL Syntax
SELECT * FROM employees WITH UR;
SELECT * FROM employees WITH CS;
SELECT * FROM employees WITH RS;
SELECT * FROM employees WITH RR;
HeliosDB-Specific Settings
Server Configuration
password = "your_secure_password"
keystore = "/path/to/keystore.jks"
keystore_password = "password"
Environment Variables
| Variable | Description |
|---|
HELIOSDB_DRDA_PORT | DRDA protocol port |
HELIOSDB_DRDA_PASSWORD | Authentication password |
HELIOSDB_DRDA_SSL_ENABLED | Enable SSL |
Fetch Size
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM large_table");
Query Optimization
-- Fetch first N rows only
FETCH FIRST 100 ROWS ONLY;
Connection Pooling
// Recommended pool settings for DB2
HikariConfig config = new HikariConfig();
config.setMaximumPoolSize(20);
config.setMinimumIdle(5);
config.setIdleTimeout(300000);
config.setMaxLifetime(1800000);
config.setConnectionTimeout(30000);
Related: README.md | COMPATIBILITY.md | EXAMPLES.md
Last Updated: December 2025