Skip to content

Add Oracle 11g (11.1/11.2) thin-mode support#1

Merged
datlechin merged 1 commit into
tablepro-mainfrom
feat/oracle-11g-floor
May 27, 2026
Merged

Add Oracle 11g (11.1/11.2) thin-mode support#1
datlechin merged 1 commit into
tablepro-mainfrom
feat/oracle-11g-floor

Conversation

@datlechin
Copy link
Copy Markdown
Member

Lowers the protocol floor to 11.1 and implements the legacy O5LOGON and TTC wire format that pre-12.1 servers use. Validated against a live Oracle 11.2.0.2 XE instance: connect, authenticate, and fetch multiple rows with VARCHAR2, NUMBER, and DATE columns.

python-oracledb stops at 12.1 on purpose, so the pre-12.1 wire differences came from go-ora (the open thin driver that speaks 11g) plus packet captures against the live server.

Changes

  • Floor: TNS_VERSION_MIN_ACCEPTED 315 -> 313 (11.1). 10g and earlier still rejected (they use the O3LOGON handshake this driver does not implement).
  • Accept packet: 11.x omits the SDU and OOB fields, so gate their read on protocol version >= 315.
  • Auth: a 48-byte server session key (11g/10g verifier) derives the combo key with the legacy MD5-XOR scheme instead of 12c PBKDF2. The branch keys on session-key length, matching python-oracledb, so 12c servers with a legacy-verifier account keep using PBKDF2.
  • Execute: the al8pidmlrc fields exist only from 12.1; sending them to an 11.x server caused ORA-03120 (two-task conversion routine: integer overflow), so gate them on field version >= 12.1.
  • Error status (OER): 11.x carries the return code in the early error-number field and omits the trailing number/row-count pair.

Tests

Updated the Accept message tests: protocol 312 (10g) is rejected, protocol 314 (11.2) decodes. Both pass.

Notes

Targets tablepro-main. After merge, bump TablePro's Package.resolved oracle-nio revision to the merged commit.

Lowers the protocol floor to 11.1 and implements the legacy O5LOGON and
TTC wire format pre-12.1 servers use. Validated against Oracle 11.2.0.2
XE: connect, auth, and multi-row VARCHAR2/NUMBER/DATE fetch.

- Accept packet: 11.x omits the SDU and OOB fields, so gate their read
  on protocol version >= 315 (large SDU).
- Auth: a 48-byte server session key (11g/10g verifier) derives the
  combo key with the legacy MD5-XOR scheme instead of 12c PBKDF2.
- Execute: the al8pidmlrc fields exist only from 12.1; sending them to
  an 11.x server caused ORA-03120, so gate them on field version >= 12.1.
- Error status: 11.x carries the return code in the early error-number
  field and omits the trailing number/row-count pair.
@datlechin datlechin merged commit 254b72a into tablepro-main May 27, 2026
@datlechin datlechin deleted the feat/oracle-11g-floor branch May 27, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant