Skip to content

Oracle 23ai Protocol Documentation

This directory contains comprehensive documentation for HeliosDB’s Oracle 23ai protocol support, SQL compatibility, and the PL/SQL roadmap.

Overview

HeliosDB Full implements the Oracle TNS wire protocol, so Oracle thin-mode clients (python-oracledb thin mode, the Oracle JDBC thin driver) can connect to the same database that PostgreSQL and MySQL clients use. Statements received on the Oracle listener are executed by HeliosDB’s SQL engine; the Oracle compatibility module (dialect translation, PL/SQL, DBMS_ packages) is only partly on that path today.

Quick Start

Terminal window
export HELIOSDB_ORACLE_NATIVE_PASSWORD='a-long-random-password' # from your secrets store
heliosdb-full --data-dir /var/lib/heliosdb --enable-oracle
import os, oracledb # thin mode
conn = oracledb.connect(user="app", password=os.environ["HELIOSDB_ORACLE_NATIVE_PASSWORD"],
dsn="localhost:1521/heliosdb")
conn.autocommit = True
cur = conn.cursor()
cur.execute("SELECT name FROM employees WHERE dept_id = :d ORDER BY emp_id", d=20)
print(cur.fetchall())

The Oracle Quick Start lists what runs over the listener and how to write the rest.

Contents

FileDescription
README.mdOverview, compatibility matrix, and roadmap (this file)
In-house applicationsWhat to expect for a typical in-house application, how it was assessed, and how to assess your own
CONFIGURATION.mdTNS listener, NLS settings, security, and connection pooling
COMPATIBILITY.mdDetailed SQL, PL/SQL, and DBMS package compatibility
EXAMPLES.mdPractical SQL, PL/SQL, JDBC, and OCI examples
PLSQL_SUPPORT.mdPL/SQL roadmap, constructs in scope, conversion patterns, and workarounds

Oracle 23ai Compatibility Matrix

Overall Compatibility

HeliosDB Full’s Oracle compatibility module covers a large part of Oracle’s feature surface. For typical in-house applications, core data access runs unchanged through the Oracle listener today, and the rest needs the rewrites described in Oracle compatibility for in-house applications. It is not a drop-in replacement. The matrix below describes the Oracle compatibility module; PL/SQL blocks, CONNECT BY, MERGE and several Oracle functions are not yet executed correctly when sent through the listener (see the in-house page for the results by usage area).

Feature CategoryResultNotes
Core SQLSupportedSELECT, INSERT, UPDATE, DELETE, MERGE
DDL StatementsSupportedCREATE, ALTER, DROP for common objects
PL/SQL CoreBetaAnonymous blocks, procedures, functions
PL/SQL PackagesBetaPackage specifications and bodies
DBMS PackagesPartialCore DBMS_* packages only
Hierarchical QueriesSupportedCONNECT BY, START WITH
CursorsBetaExplicit cursors, REF CURSOR
BULK OperationsBetaBULK COLLECT, FORALL
XMLTypeAlphaBasic operations only
JSON FunctionsSupportedOracle 21c+ JSON functions
Pseudo-columnsSupportedROWNUM, ROWID, LEVEL
AnalyticsSupportedCore window functions
Object TypesAlphaBasic user-defined types
CollectionsBetaNested tables, VARRAYs
TriggersBetaRow-level and statement-level
SequencesSupportedNEXTVAL, CURRVAL
SynonymsSupportedPublic and private
ViewsSupportedStandard and updatable views
Materialized ViewsBetaBasic refresh only

What to expect by application type

Assessed through the Oracle listener (HeliosDB Full main a3cf7ce, python-oracledb thin mode), against how typical in-house applications use the database:

Application profileWhat to expect
SQL/ORM-centric (little or no PL/SQL)The best fit: core DDL, DML and queries run as written; Oracle-specific syntax and functions need rewriting
Typical in-house applicationCore data access runs unchanged; plan to rewrite Oracle-specific syntax, most built-in functions, sequences and PL/SQL
PL/SQL-heavy (business logic in packages)PL/SQL is not executed through the listener yet; move the logic to the application or migrate it

Oracle Forms/APEX and tools that rely on the data dictionary, PL/SQL or OCI are not expected to work. For a migration, move the application to a PostgreSQL driver and convert the schema and code with a migration tool; see the Oracle migration guide.


Core Feature Overview

Wire Protocol: Oracle TNS

HeliosDB implements the TNS protocol for network communication:

  • Protocol Version: TNS 12.2 compatibility
  • Connection Types: Easy Connect, TNS Names, JDBC Thin
  • Authentication: Password, RADIUS (LDAP planned)
  • Encryption: TLS 1.2/1.3 for wire encryption
  • Packet Size: Configurable up to 32KB

SQL Dialect Support

CategorySupportedPartialNot Supported
DMLSELECT, INSERT, UPDATE, DELETE, MERGEINSERT ALLUPSERT (use MERGE)
DDLCREATE/ALTER/DROP TABLE, INDEX, VIEWSEQUENCE, SYNONYMCLUSTER, CONTEXT
QueryJOINs, Subqueries, CTEsCONNECT BY, PIVOTMODEL clause
Set OpsUNION, UNION ALL, INTERSECT, MINUS--
LockingSELECT FOR UPDATELOCK TABLE-

PL/SQL

PL/SQL execution through the Oracle listener — procedures, functions, anonymous blocks and common DBMS_ packages — is on the roadmap. Today, port PL/SQL to PL/pgSQL functions and run them through the PostgreSQL interface, or move the logic into the application tier.

Planned scope:

Core constructs:

  • Anonymous blocks (DECLARE/BEGIN/END)
  • Stored procedures and functions
  • Basic package specifications and bodies
  • Explicit cursors (OPEN, FETCH, CLOSE)
  • Control flow (IF, CASE, LOOP, WHILE, FOR)
  • Exception handling (EXCEPTION, RAISE, WHEN)
  • Basic collections (nested tables)

Basic forms:

  • REF CURSOR (basic operations)
  • BULK COLLECT (simple cases)
  • FORALL (without SAVE EXCEPTIONS)
  • Triggers (row-level only)
  • Object types (simple structures)

Not Supported:

  • Autonomous transactions
  • DBMS_PIPE and DBMS_ALERT
  • Native compilation
  • Java stored procedures
  • Pipelined functions
  • Compound triggers

Implemented Packages

PackageKey Functions
DBMS_OUTPUTPUT_LINE, PUT, NEW_LINE, GET_LINE, ENABLE, DISABLE
DBMS_UTILITYFORMAT_ERROR_BACKTRACE, GET_TIME, COMMA_TO_TABLE
UTL_FILEFOPEN, FCLOSE, GET_LINE, PUT_LINE, FFLUSH

Partially Implemented Packages

PackageSupported FunctionsNot Supported
DBMS_SQLOPEN_CURSOR, PARSE, EXECUTE, CLOSE_CURSORDESCRIBE_COLUMNS, array binds
DBMS_LOBGETLENGTH, SUBSTR, INSTR, APPENDLOADFROMFILE, BFILE operations
DBMS_METADATAGET_DDL (tables, indexes)Complex object types
DBMS_SCHEDULERCREATE_JOB, DROP_JOB, RUN_JOBComplex schedules, chains
DBMS_STATSGATHER_TABLE_STATSHistogram operations
DBMS_RANDOMVALUE, STRING, INITIALIZESEED with complex types
DBMS_SESSIONSET_IDENTIFIERMost functions
DBMS_APPLICATION_INFOSET_MODULE, SET_ACTIONREAD functions
DBMS_CRYPTOBasic ENCRYPT/DECRYPTAdvanced algorithms

Not Implemented Packages

PackageReasonAlternative
DBMS_AQMessage queuing architecture differsHeliosDB native queuing
DBMS_PIPEInter-session communicationUse tables or external queues
DBMS_ALERTEvent notificationHeliosDB LISTEN/NOTIFY
DBMS_LOCKLock managementStandard transaction isolation
DBMS_PARALLEL_EXECUTEParallel processingHeliosDB native parallelism
DBMS_XADistributed transactionsHeliosDB 2PC support
DBMS_FLASHBACKFlashback architectureHeliosDB MVCC time-travel
UTL_HTTPHTTP operationsExternal services
UTL_SMTPEmail operationsExternal services
UTL_TCPNetwork operationsNot applicable

Connection Parameters

Server Configuration

ParameterDefaultDescription
hostlocalhostServer hostname or IP address
port1521Oracle TNS listener port
service_nameheliosdbOracle service name
sidHELIOSOracle SID (legacy)
username-Authentication username
password-Authentication password

Connection String Formats

-- Easy Connect format
sqlplus user/pass@//host:port/service_name
-- Easy Connect examples
sqlplus admin/password@//localhost:1521/heliosdb
sqlplus admin/password@//db.example.com/PROD
-- TNS Names format (requires tnsnames.ora)
sqlplus admin/password@HELIOSDB

TNS Names Configuration

tnsnames.ora
HELIOSDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = heliosdb)
)
)
HELIOSDB_SSL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCPS)(HOST = localhost)(PORT = 2484))
(CONNECT_DATA =
(SERVICE_NAME = heliosdb)
)
(SECURITY =
(SSL_SERVER_CERT_DN = "cn=heliosdb,o=example,c=US")
)
)

Oracle SQL Functions

String Functions

FunctionResultNotes
INSTRSupportedNegative position, nth occurrence
SUBSTRSupportedNegative position, overflow handling
LENGTHSupportedNULL returns NULL
LPAD/RPADSupportedMulti-character padding
LTRIM/RTRIMSupportedMulti-character trim set
TRIMSupportedLEADING, TRAILING, BOTH
TRANSLATESupportedCharacter-by-character replacement
REPLACESupportedString replacement
UPPER/LOWERSupportedCase conversion
INITCAPSupportedTitle case
CONCATSupportedString concatenation
NVLSupportedNULL replacement
NVL2SupportedConditional NULL replacement
DECODESupportedArbitrary pairs with default
COALESCESupportedFirst non-NULL value
REGEXP_LIKESupportedRegular expression matching
REGEXP_REPLACESupportedPattern replacement
REGEXP_SUBSTRSupportedPattern extraction
REGEXP_INSTRPartialBasic patterns only
REGEXP_COUNTPartialBasic patterns only

Numeric Functions

FunctionResultNotes
ABSSupportedAbsolute value
CEIL/FLOORSupportedRounding
ROUNDSupportedDecimal places
TRUNCSupportedDecimal truncation
MODSupportedModulo operation
POWERSupportedExponentiation
SQRTSupportedSquare root
SIGNSupportedSign determination
GREATESTSupportedNULL propagation
LEASTSupportedNULL propagation
NULLIFSupportedNULL on equality

Date Functions

FunctionResultNotes
SYSDATESupportedCurrent date
SYSTIMESTAMPSupportedCurrent timestamp with timezone
CURRENT_DATESupportedSession timezone aware
CURRENT_TIMESTAMPSupportedSession timezone aware
ADD_MONTHSSupportedLeap year and month-end handling
MONTHS_BETWEENSupportedFractional results
LAST_DAYSupportedLast day of month
NEXT_DAYSupportedNext weekday
TRUNC (date)SupportedDate truncation
ROUND (date)SupportedDate rounding
EXTRACTSupportedDate part extraction
TO_DATESupportedFormat models
TO_CHAR (date)SupportedFormat models
TO_TIMESTAMPSupportedTimestamp conversion

Aggregate Functions

FunctionResultNotes
COUNTSupportedIncluding COUNT(*) and COUNT(DISTINCT)
SUMSupportedNumeric summation
AVGSupportedNumeric average
MIN/MAXSupportedAll data types
LISTAGGSupportedString aggregation
MEDIANPartialApproximate in some cases
STDDEVSupportedStandard deviation
VARIANCESupportedStatistical variance

Analytic (Window) Functions

FunctionResultNotes
ROW_NUMBERSupportedRow numbering
RANKSupportedRanking with gaps
DENSE_RANKSupportedRanking without gaps
NTILESupportedDistribution
LAGSupportedPrevious row value
LEADSupportedNext row value
FIRST_VALUESupportedFirst in window
LAST_VALUESupportedLast in window
NTH_VALUEPartialBasic usage only
KEEPPartialFIRST/LAST only
Windowing clausesSupportedROWS, RANGE

Driver Compatibility

DriverVersionResultNotes
Oracle JDBC Thin19c, 21c, 23aiTestedPrimary development driver
Oracle JDBC OCI19c, 21cPartialRequires Oracle Client
cx_Oracle (Python)8.xTestedDeprecated, use oracledb
oracledb (Python)1.x, 2.xTestedRecommended for Python
node-oracledb (Node.js)6.xTestedRequires Oracle Client or Thin
godror (Go)0.xPartialBasic operations
ODP.NET Managed21c+Partial.NET Core/5+
ODP.NET Unmanaged19c+LimitedRequires Oracle Client
SQL Developer21c+PartialQuery only; PL/SQL execution on the roadmap
DBeaverLatestPartialVia JDBC

Performance Characteristics

Protocol Overhead

OperationOverheadNotes
Connection Handshake+20-30msTNS negotiation
Authentication1-2 RTTPassword verification
Query Parsing+5-10%SQL dialect translation
Result Formatting+2-5%Oracle type mapping

Optimization Tips

  1. Use connection pooling: Reduce handshake overhead
  2. Batch operations: Minimize round trips
  3. Avoid ROWNUM in WHERE: Use FETCH FIRST instead
  4. Prefer ANSI JOINs: Better query optimization
  5. Keep procedural logic in PL/pgSQL or the application: PL/SQL execution through the Oracle listener is on the roadmap

Migration Guide

Assessment Checklist

  1. Catalog Oracle objects: Tables, views, procedures, packages
  2. Identify DBMS package usage: Map to HeliosDB equivalents
  3. Review PL/SQL complexity: Anonymous blocks vs packages
  4. Test hierarchical queries: CONNECT BY translation
  5. Check data types: Especially XMLType, SDO_GEOMETRY
  6. Evaluate triggers: Row-level compatibility

Common Migration Patterns

-- Oracle: ROWNUM pagination
SELECT * FROM (
SELECT t.*, ROWNUM rn FROM table t WHERE ROWNUM <= 20
) WHERE rn > 10;
-- HeliosDB: ANSI pagination (preferred)
SELECT * FROM table OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY;
-- Oracle: DECODE
SELECT DECODE(status, 'A', 'Active', 'I', 'Inactive', 'Unknown') FROM t;
-- HeliosDB: CASE (also works in Oracle)
SELECT CASE status WHEN 'A' THEN 'Active' WHEN 'I' THEN 'Inactive' ELSE 'Unknown' END FROM t;
-- Oracle: (+) outer join
SELECT * FROM a, b WHERE a.id = b.id(+);
-- HeliosDB: ANSI outer join (preferred)
SELECT * FROM a LEFT JOIN b ON a.id = b.id;

Troubleshooting

Common Issues

IssueCauseSolution
ORA-12154: TNS could not resolveService name not foundCheck tnsnames.ora or use Easy Connect
ORA-01017: Invalid username/passwordAuthentication failureVerify credentials
PLS-00201: Identifier not declaredUnsupported DBMS packageCheck package compatibility
ORA-00904: Invalid identifierUnsupported syntaxReview SQL translation
PL/SQL block reports success but has no effectPL/SQL is not executed through the Oracle listener yet (on the roadmap)Port it to PL/pgSQL and run it through the PostgreSQL interface, or move the logic to the application

Diagnostic Queries

-- Check Oracle protocol version
SELECT * FROM v$version;
-- View session parameters
SELECT * FROM nls_session_parameters;
-- Check supported functions
SELECT * FROM heliosdb_oracle_functions;
-- View compatibility level
SELECT heliosdb_oracle_compatibility() FROM DUAL;


Support and Resources

Getting Help

  1. Check this documentation for compatibility information
  2. Review EXAMPLES.md for code patterns
  3. Consult PLSQL_SUPPORT.md for PL/SQL conversion guidance
  4. Contact HeliosDB support for complex migration assistance

Version Information