Oracle Database Knowledge Base

SkillDatabases & data

Oracle knowledge base. Covers Connection Types, JDBC Driver, Connection Pool, LOB Handling, Character Set, and SQL Dialect. Intended for devlab-oracle-usage to inherit via extends.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Oracle Database Knowledge Base skill

What this skill tells your AI

The instructions your AI receives, as published by seed-forge/harness-ai-kit in skills/public-oracle-expert-base/SKILL.md and read by ahel’s review.

Source: Compiled from Oracle official documentation, JDBC best practices, and common integration patterns.

Connection Types

FormatExampleStatus
Service Namejdbc:oracle:thin:@//host:port/service_nameRecommended
SID (legacy)jdbc:oracle:thin:@host:port:SIDLegacy, avoid
TNSjdbc:oracle:thin:@tns_aliasEnterprise with tnsnames.ora
EZConnectjdbc:oracle:thin:@host:port/service_nameSimple, no config file
  • Always prefer Service Name over SID for new projects.
  • Easy Connect Plus (19c+): jdbc:oracle:thin:@tcp://host:port/service_name?wallet_location=/path.

JDBC Driver

TypeDescriptionWhen to use
Thin (Type 4)Pure Java, no Oracle clientDefault choice
Thick (OCI, Type 2)Requires Oracle ClientAdvanced features (TAF, Advanced Queuing)
UCPUniversal Connection PoolProduction pooling
  • Thin driver is sufficient for 95% of use cases.
  • Use ojdbc8.jar for JDK 8+, ojdbc11.jar for JDK 11+.
  • Add orai18n.jar for internationalization support.

Connection Pool

PoolRecommended for
UCP (Oracle)Oracle-specific features, best performance
HikariCPSpring Boot, general-purpose, simpler config

HikariCP config for Oracle:

spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@//host:1521/service_name
spring.datasource.hikari.maximum-pool-size=20
spring.datasource.hikari.connection-timeout=5000
spring.datasource.hikari.idle-timeout=300000
spring.datasource.hikari.connection-test-query=SELECT 1 FROM DUAL

LOB Handling

  • CLOB for large text (>4000 chars); BLOB for binary data.
  • Use setStringForClob() / setBinaryStream() for inserts.
  • For reads, use getCharacterStream() / getBinaryStream() — avoid getString() on large CLOBs.
  • LOB locator vs data: oracle.jdbc.useStreamForLobOutput=true for streaming writes.

Character Set

  • AL32UTF8 is the recommended database character set (Unicode).
  • JDBC driver auto-detects charset from database; no client-side config needed.
  • Verify: SELECT value FROM nls_database_parameters WHERE parameter='NLS_CHARACTERSET';

SQL Dialect Differences (vs MySQL/PostgreSQL)

FeatureOracleMySQL/PostgreSQL
Auto-incrementSEQUENCE + TRIGGER or IDENTITY (12c+)AUTO_INCREMENT / SERIAL
LIMITFETCH FIRST n ROWS ONLY (12c+) or ROWNUMLIMIT n
String concat`
Date functionsSYSDATE, ADD_MONTHS(), MONTHS_BETWEEN()NOW(), DATE_ADD()
BooleanNo native BOOLEAN in SQL (use NUMBER(1))Native BOOLEAN
Outer join syntax(+) legacy or ANSI LEFT JOINANSI LEFT JOIN

Oracle Wallet

  • Wallet stores credentials for mutual TLS authentication.
  • Location: set oracle.net.wallet_location in connection properties.
  • For Autonomous Database: download wallet zip, extract to directory, reference in connection string.

Guardrails

  • Use Service Name format, not SID.
  • Always use connection pooling (UCP or HikariCP).
  • Use bind variables (prepared statements) — never string concatenation for SQL.
  • Set oracle.jdbc.ReadTimeout and oracle.net.CONNECT_TIMEOUT.
  • For LOBs >4KB, always use streaming API.

Signals

GitHub stars
22
Forks
2
Last commit
Aug 2026
Advanced
Catalog kind
skill
Gateway key
public-oracle-expert-base
Source
github.com/seed-forge/harness-ai-kit