Skip to main content

ArpeOracle — Connection guide

Everything you can put in front of ArpeOracle to point it at an Oracle database, in one place: the three ways to supply connection details, every option the driver accepts, and the Oracle-specific rules (EZConnect, SID vs service name, TCPS wallets, Oracle Cloud Autonomous Database).

For how each authentication method works (O5LOGON, OCI IAM token, OAuth2/Entra ID, proxy, change-password, TLS), see Authentication. For the licence, see Licensing.


Three ways to connect​

Every driver in the Arpeio family accepts the same three connection forms. They can be mixed; a discrete option always wins over the same field taken from a connection_string or a uri, regardless of the order they are set.

FormOption keyGrammarBest for
Discrete optionsadbc.arpeoracle.<field>one option per fieldprogrammatic clients, secrets kept out of a single string
Connection stringadbc.arpeoracle.connection_stringADO.NET Key=Value;… (+ Oracle EZConnect in Server)pasting an existing string
Connection URIurioracle://… URLportable tooling, copy-paste from other Oracle ADBC tools
Python
import adbc_driver_manager.dbapi as dbapi

# Discrete options
conn = dbapi.connect(driver="arpeoracle", db_kwargs={
"adbc.arpeoracle.server": "localhost",
"adbc.arpeoracle.port": "1521",
"adbc.arpeoracle.service_name": "orclpdb1",
"adbc.arpeoracle.username": "scott",
"adbc.arpeoracle.password": "tiger",
})

# Connection string (ADO.NET keywords, or Oracle EZConnect in Server)
conn = dbapi.connect(driver="arpeoracle", db_kwargs={
"adbc.arpeoracle.connection_string":
"Server=localhost:1521/orclpdb1;User ID=scott;Password=tiger",
})

# Connection URI (Oracle URL grammar)
conn = dbapi.connect(driver="arpeoracle", db_kwargs={
"uri": "oracle://scott:tiger@localhost:2484/orclpdb1?ssl_mode=verify-full",
})

Precedence is per field: a field parsed from connection_string/uri is applied only if no discrete adbc.arpeoracle.* option already set it.


Option reference​

All options are string-typed and live under the adbc.arpeoracle.* namespace. Set them as ADBC database options before the connection is opened. Statement and ingest options are set on the statement — see Statement & ingest options.

Value lengths. Each string value has a maximum length in bytes, the same whether it comes from a discrete option, the connection string, the URI or a TNS descriptor. A longer value is refused with INVALID_ARGUMENT and a message naming the option or keyword ('Password' value too long (max 1024 bytes)); it is never shortened. Since v0.4.1; before that, some connection-string values were cut short silently.

ValueMax bytes
password, new_password1024 (Oracle's own maximum)
username, proxy_user255
server (host), service_name / sid255
app_name127
wallet_password255
ssl_root_cert, wallet_location, tns_admin1023
ssl_server_cert_dn511
a whole (DESCRIPTION=…) in Server2047

In the URI the limit applies to the decoded value (%3B counts as one byte). A connection string or URI value of 4096 bytes or more is refused the same way.

Target — where to connect​

OptionDefaultMeaning
adbc.arpeoracle.server—Host name or IP. Also accepts an Oracle EZConnect descriptor (host:port/service, see EZConnect), a full (DESCRIPTION=…) TNS descriptor, or a tnsnames.ora alias.
adbc.arpeoracle.tns_admin—Directory holding tnsnames.ora, for alias resolution. Unset: TNS_ADMIN, then $ORACLE_HOME/network/admin. Since v0.3.11.
adbc.arpeoracle.port1521TCP port, 1..65535. TCPS listeners conventionally use 2484 — set it explicitly.
adbc.arpeoracle.service_name—Oracle service name / PDB. The usual way to name a database.
adbc.arpeoracle.sid—Oracle SID. Selects a different CONNECT_DATA form on the wire — mutually exclusive with service_name: as discrete options, whichever is set last wins; in a connection string or uri, giving both is rejected.
adbc.arpeoracle.app_nameArpeOracleProgram name reported to the server: V$SESSION.PROGRAM (and MODULE, which defaults from it) and the connect descriptor (since v0.3.6; before that it only reached the connect descriptor). V$SESSION_CONNECT_INFO.CLIENT_DRIVER always reports the driver itself (ArpeOracle <version>).

Authentication​

Full method-by-method detail is in Authentication.

OptionValuesMeaning
adbc.arpeoracle.username / .passwordstringOracle credentials (O5LOGON challenge-response — the password is never sent in clear, even without TLS). The bare keys username / password are accepted as aliases.
adbc.arpeoracle.auth_methodpassword (default) / token / oauth2Selects the login method. Only oauth2 is auto-selected, when access_token or token_file is set (an explicit non-oauth2 auth_method alongside them is rejected). token must be set explicitly.
adbc.arpeoracle.proxy_userschemaAuthenticate as username, open the session in this user's schema via Oracle CONNECT THROUGH proxy.
adbc.arpeoracle.new_passwordstringChange username's password as part of login — the way in past an expired one.
adbc.arpeoracle.allowed_logon_version11 (default) / 12Minimum password verifier accepted from the server (Oracle's SQLNET.ALLOWED_LOGON_VERSION_CLIENT). 11 accepts the 11G and 12C verifiers; 12 accepts 12C only (12a is a synonym), refusing an 11G challenge before anything derived from the password is sent. See Authentication. Since v0.4.1.
adbc.arpeoracle.token_locationdirOCI IAM database token: directory holding the token and its PEM private key (as oci iam db-token get writes). Used with auth_method=token, which must be set explicitly — this option alone does not select it. Requires TLS (since v0.4.1).
adbc.arpeoracle.access_tokenJWTOAuth2 / Microsoft Entra ID bearer token, inline. Selects auth_method=oauth2. Requires TLS (since v0.4.1).
adbc.arpeoracle.token_filepathSame OAuth2 bearer token, read from a file (inline access_token wins if both are set).

Encryption / TLS (TCPS)​

OptionDefaultMeaning
adbc.arpeoracle.ssl_modedisable (verify-full for a TCPS descriptor or tnsnames.ora entry, since v0.4.1)disable (plain TCP) / require (encrypt, cert not verified, unless a CA is given: see below) / verify-ca (chain verified) / verify-full (chain and hostname, or chain and ssl_server_cert_dn — use this one).
adbc.arpeoracle.ssl_root_cert—PEM CA bundle for verify-ca/verify-full (else the CAs in the wallet, else the operating system's CA store: see Authentication → TLS).
adbc.arpeoracle.ssl_server_cert_dn—Oracle's SSL_SERVER_CERT_DN: under verify-full, the server certificate's subject must be this DN (e.g. CN=db.example.com,O=Example,C=US) instead of carrying the hostname. Every attribute must match, in any order; names and values compare case-insensitively, and whitespace around , and = is ignored. Also taken from a descriptor's SECURITY section. Since v0.4.1.
adbc.arpeoracle.wallet_location—Directory holding ewallet.pem (client key + cert + CAs), python-oracledb-thin layout. This is exactly an unzipped Oracle Cloud ADB wallet.
adbc.arpeoracle.wallet_password—Unlocks an encrypted key inside the wallet.

TLS 1.2 is the minimum protocol version. wallet_location or ssl_root_cert together with ssl_mode=disable is rejected at connect rather than silently ignored — set ssl_mode as well. See Authentication → TLS for the TLS version floor, where trusted certificates come from on each OS, SNI and mutual TLS.

require never ignores a CA you gave. With ssl_root_cert or wallet_location set, require verifies the certificate chain against that CA (it acts as verify-ca, the rule libpq applies to sslmode=require with a root certificate). Only require with neither encrypts without verifying. Since v0.4.1; before that, require never verified.

ssl_mode is disable by default, and the default NNE stance (accepted, below) encrypts only when the server requests or requires it — against a server left at its ACCEPTED default the connection is plaintext. O5LOGON keeps the password off the wire, but SQL text and result data are in clear until you set ssl_mode, set encryption=requested/required, or the server asks for Native Network Encryption.

Native Network Encryption (NNE)​

Version

Since ArpeOracle v0.1.3.

Oracle's transport-layer encryption, negotiated after ACCEPT — no TCPS required. See Authentication for the other ways to protect a connection.

OptionValuesMeaning
adbc.arpeoracle.encryptionaccepted (default) / rejected / requested / requiredClient stance for AES-256 payload encryption (Oracle's SQLNET.ENCRYPTION_CLIENT). required fails the connect if the server will not encrypt. With requested/required, encryption never runs without integrity (below).
adbc.arpeoracle.data_integritysame four valuesClient stance for the SHA-256 (or SHA-1) integrity checksum (Oracle's SQLNET.CRYPTO_CHECKSUM_CLIENT).

Values are case-insensitive. The stances behave exactly like Oracle's own clients (ODP.NET, OCI): the client offers the service at its level and the server decides. With the default accepted, the result follows the server's SQLNET.ENCRYPTION_SERVER / SQLNET.CRYPTO_CHECKSUM_SERVER:

Client ↓ / Server →REJECTEDACCEPTED (server default)REQUESTEDREQUIRED
rejectedoffoffoffconnect fails
accepted (default)offoffonon
requestedoffononon
requiredconnect failsononon

Asking for encryption brings integrity (since v0.4.1). AES-256-CBC without the checksum is malleable (an on-path attacker can flip chosen bytes undetected), so with encryption=requested/required:

  • an accepted (default) data_integrity is sent as requested, so a server left at CRYPTO_CHECKSUM_SERVER=ACCEPTED switches integrity on with the encryption;
  • data_integrity=rejected is refused at AdbcDatabaseInit;
  • a negotiation that still ends with encryption on and integrity off (a server whose CRYPTO_CHECKSUM_SERVER is REJECTED) fails the connect: enable SQLNET.CRYPTO_CHECKSUM_SERVER on the server, or use TCPS.

The default encryption=accepted stance accepts a plaintext session, so if the server switches encryption on without integrity (e.g. ENCRYPTION_SERVER=REQUESTED with CRYPTO_CHECKSUM_SERVER=ACCEPTED) it connects encrypted without the checksum, as Oracle's own clients do. Set encryption=requested (or data_integrity=requested) to get both.

Otherwise each service is negotiated independently. rejected on both services is the opt-out: native services are not advertised at all and the handshake is the plain one byte-for-byte. Over TCPS an accepted stance does not advertise NNE (the transport is already encrypted); requested/required still do.

Version

Since ArpeOracle v0.3.8, accepted advertises NNE and lets the server decide. Before that, native services were only advertised for requested/required, so a default client got plaintext from a REQUESTED server and failed against a REQUIRED one.

Cost of the default. Advertising means every accepted connection over plain TCP makes one extra ANO round trip at connect, and a server set to REQUESTED now gets an AES-256 + checksum session by default, which costs throughput on bulk exports. Every encrypted connection negotiates whatever the stance (NNE keys are per session), so only a plaintext outcome can skip the round trip: encryption=rejected + data_integrity=rejected restores the old plaintext handshake with no extra round trip.

Only AES-256 and SHA-256/SHA-1 are offered — the legacy ciphers (DES/3DES/RC4) and MD5 are never proposed.

NNE resists passive eavesdropping only. The session keys come from an unauthenticated Diffie-Hellman exchange, so an active man-in-the-middle can run one key exchange with the driver and another with the server. Against an attacker who can alter traffic, use TCPS with ssl_mode=verify-full. The driver does refuse a Diffie-Hellman group that would let a passive listener recover the keys: a modulus under 2048 bits, an even modulus, or a generator or server public value outside 1 < x < p-1 fails the connect (since v0.4.1). Oracle servers send a 2048-bit group.

Timeouts & performance​

OptionDefaultMeaning
adbc.arpeoracle.login_timeout30Budget in seconds for the whole login (0 = no limit): the TCP connect, the TLS handshake, the CONNECT/ACCEPT exchange (redirects included), Native Network Encryption negotiation and authentication all share it. When it runs out the connect fails with login timed out after N s during the <step>. Since v0.4.1; before that it bounded the TCP connect only.
adbc.arpeoracle.socket_timeout0 (none)Per-socket read/write timeout in seconds once logged in (0 = no limit). During the login it also applies, whichever of the two runs out first.
TCP keepalivealways onNot an option. Every connection sets SO_KEEPALIVE (first probe after 60 s without traffic, then every 10 s, the connection failed after 6 unanswered probes), so a server that disappears during a long query is detected in about two minutes even with socket_timeout=0. A query that is merely slow is unaffected. Since v0.4.1.
adbc.arpeoracle.sdu65535Session Data Unit in bytes — the largest TNS DATA packet the driver offers. The server keeps the lower of this and its own DEFAULT_SDU_SIZE (sqlnet.ora, 8192 unless configured), so a large read only gets bigger packets once the server allows them. A larger SDU means fewer packets, and so fewer per-packet AES/MAC operations and syscalls, on a big fetch. Range 512..2097152; any other value, 0 included, is rejected. Default 65535 since v0.4.1 (8192 before).
adbc.arpeoracle.batch_size32000Rows per streamed Arrow batch (also Buffer Size in a connection string). A memory knob, not a throughput knob: from about 10,000 rows per batch upward throughput is essentially flat while memory grows linearly with the batch size, so pick the size that suits the consumer. Range 1..10000000.
adbc.arpeoracle.statement_cache_size20Number of server cursors held open and reused per connection, keyed by SQL text. Reusing a cursor skips the hard parse and prevents the per-statement cursor leak that would otherwise exhaust OPEN_CURSORS on a long-lived connection. 0 disables reuse (cursors are still closed, just not reused). A query whose table changed under its cached cursor (ORA-01007, ORA-00932, or a new column list) is re-run once on a fresh parse (since v0.4.1). Matches oracledb's stmtcachesize. Range 0..65535.
Version

adbc.arpeoracle.sdu is configurable since ArpeOracle v0.3.0. It is a database option only (no connection-string or URI keyword).

Type rendering (read path)​

OptionValuesMeaning
adbc.arpeoracle.number_mappingauto (default) / double / decimal:P,SHow Oracle's unconstrained NUMBER maps to Arrow. auto → lossless utf8; double → float64 (lossy); decimal:P,S → decimal128(P,S) (a value that does not fit fails the query with SQLSTATE 22003, never rounded; since v0.4.1). See Data types.
adbc.arpeoracle.interval_mappingparquet (default) / nativeHow INTERVAL columns map to Arrow (since v0.3.7). parquet → int64 months (YEAR TO MONTH) and utf8 ISO-8601 (DAY TO SECOND), both Parquet-writable; native → Arrow interval(month_day_nano), which has no Parquet representation. See Data types.

Licence​

OptionMeaning
arpeio.adbc.licenseLicence blob, inline.
arpeio.adbc.license_filePath to a .lic file.
arpeio.adbc.license.statusRead-only (GetOption); reports <state>;code=<ARROW_LIC_*>;tier=<tier>;expires=<epoch>.

The driver also reads the shared ARPEIO_ADBC_LICENCE[_FILE] environment variables and an arpeio_adbc.lic file next to the library. Full resolution order in Licensing.

Driver information​

Version

Since ArpeOracle v0.4.1.

Option / codeMeaning
adbc.arpeoracle.openssl_versionRead-only (AdbcDatabaseGetOption, no licence or connection needed): the OpenSSL the driver runs with, e.g. OpenSSL 3.6.5 29 Sep 2026. The released binaries link OpenSSL statically, so this is the copy inside the .so/.dll: compare it with an OpenSSL advisory to know whether a deployed driver is affected.
GetInfo code 10000The same string from AdbcConnectionGetInfo. Python's conn.adbc_get_info() returns it under the integer key 10000.

AdbcConnectionGetInfo also reports the standard codes driver_name, driver_version, driver_arrow_version, driver_adbc_version (an int64, 1001000 for ADBC 1.1.0), vendor_name (Oracle) and vendor_version (the server version, e.g. 23.26.0.0.0). Only vendor_version needs a session: a call for any other codes is answered without touching the network, so the driver name and version are available with the server down.

Standard ADBC connection options​

These use the ADBC-standard keys (no arpeoracle namespace):

OptionValuesMeaning
adbc.connection.autocommittrue (default) / falseAutocommit mode, set on the connection (exactly true or false). With it off, Connection.Commit / Rollback drive an explicit transaction; with it on they are rejected. Switching it back on commits any open transaction. If the session is lost (a cancel, a connection failure) with uncommitted work, the server rolls that work back and Commit and later calls fail with INVALID_STATE / SQLSTATE 08007 until Rollback acknowledges it (since v0.4.1; see Troubleshooting).
adbc.connection.catalogread-onlyReports the connected service name (an Oracle session reaches one catalog only). GetTableSchema with any other catalog name returns NOT_FOUND.
adbc.connection.db_schemaschema nameCurrent schema: unqualified names resolve in it (ALTER SESSION SET CURRENT_SCHEMA); privileges stay the login user's. The name is used exactly as given (quoted), so pass it as Oracle stores it, usually upper case. A schema that does not exist is NOT_FOUND and leaves the current schema unchanged. Reading it returns the schema last set, or the login user's. Settable since v0.3.12 (read-only before).

adbc.connection.autocommit and adbc.connection.db_schema are the options that can be set on a connection; any other connection key is rejected (NOT_IMPLEMENTED).

Statement & ingest options​

Set on the statement handle, not the database:

OptionDefaultMeaning
arpeoracle.sdo.srid—Read path. Force a specific SRID onto every MDSYS.SDO_GEOMETRY (geoarrow.wkb) column in the result, overriding whatever SRID is stored in the geometry, and applied even when the result has no rows to inspect. A non-numeric, zero, negative, or out-of-range value is rejected with ADBC_STATUS_INVALID_ARGUMENT. Without it the driver surfaces each geometry column's own stored SDO_SRID. Since v0.3.1 (named arrowttc.sdo.srid until v0.3.3). See Data types.
arpeoracle.sdo.spatial_indextrueIngest. true / false. After an ingest that writes geoarrow.wkb columns, register each one in USER_SDO_GEOM_METADATA and create its spatial index. A registration failure (e.g. a missing privilege) is reported as an error naming this option. No effect when the ingested data has no geometry column. Since v0.3.1 (named arrowttc.sdo.spatial_index until v0.3.3).
adbc.ingest.target_table—Target table for adbc_ingest, taken exactly as given (quoted). A name containing a double quote is rejected (INVALID_ARGUMENT).
adbc.ingest.modeadbc.ingest.mode.createadbc.ingest.mode.create / adbc.ingest.mode.append / adbc.ingest.mode.replace / adbc.ingest.mode.create_append (the ADBC-standard values; any other value is rejected).
adbc.ingest.target_db_schema—Target schema for ingest.
adbc.ingest.target_catalog—Oracle reaches one catalog per session; the connected service name is accepted, any other value is rejected (NOT_IMPLEMENTED).
adbc.ingest.temporaryfalseIngest into a GLOBAL TEMPORARY table (ON COMMIT PRESERVE ROWS). Only the exact value true enables it; anything else means false.
adbc.arpeoracle.ingest_methodautoHow ingest writes the rows: auto, direct_path or insert. Also accepted as a database option, as the default for every statement. See Ingest method. Since v0.4.0.
adbc.arpeoracle.ingest_batch_rows50000The most rows one array-bound INSERT execute carries (1..10000000): a larger Arrow batch is split into several executes, each also kept to about 16 MiB of encoded values. Bounds the memory one batch costs, not the throughput. Also accepted as a database option, as the default for every statement. Since v0.4.1; before that a batch went out as one execute.

Setting a new SQL query on the statement clears the ingest options (target, mode, schema, temporary, ingest_method and ingest_batch_rows back to the database's setting, and arpeoracle.sdo.spatial_index back to true).

Ingest method​

Version

Since ArpeOracle v0.4.0. Earlier versions always use the array-bound INSERT.

adbc_ingest writes rows in one of two ways:

  • Direct path load, as SQL*Loader DIRECT=TRUE does: formatted blocks are written above the table's high-water mark without running the SQL engine per row. On Oracle 19c it loaded 6 million LINEITEM rows in 2.9 s, against 112 s for the INSERT path.
  • Array-bound INSERT, one round trip per batch, or per chunk of at most adbc.arpeoracle.ingest_batch_rows rows and about 16 MiB of values when the batch is larger. With autocommit on, only a batch's last chunk carries the commit, so a batch commits once whatever its size.

The driver gives every value what an INSERT would store: NUMBER values are rounded to the column's scale and checked against its precision, TIMESTAMP fractions are rounded, CHAR is blank-padded, and NULLs and over-long values are refused with the column and row named. The Arrow types each column type loads by direct path are listed in Data types. A direct path load differs from an INSERT in three ways:

  • It commits. The load is its own transaction and commits when it finishes. It cannot start while the connection has uncommitted work. So auto uses it only with autocommit on.
  • It locks the table exclusively while it runs.
  • The server skips triggers and foreign keys, and a duplicate key leaves a unique index UNUSABLE instead of failing.
ValueBehaviour
auto (default)With autocommit off, always INSERT. With autocommit on (the ADBC default), direct path unless the target table has an enabled INSERT trigger, an enabled foreign key, a primary key / unique index, or a column DEFAULT the data would need (a defaulted column left out of the data, a DEFAULT ON NULL or identity column); falls back to INSERT also when the connection has uncommitted work, an index of the table is unusable, or a column type is not loadable by direct path. The choice is made before any row is sent.
direct_pathAlways direct path, or fail; it commits even with autocommit off. A table with triggers, foreign keys or such defaults is refused. A table with unique keys is loaded, and if the data had duplicate keys the call fails after the commit with ADBC_STATUS_INTEGRITY, naming the unusable indexes to rebuild.
insertAlways the array-bound INSERT: per-row semantics, triggers and constraints, part of the caller's transaction.

Spatial (geoarrow.wkb) columns and adbc.ingest.temporary tables always use INSERT. With direct_path, an ingest that a direct path load can never take (a spatial column, a temporary table, an Arrow type the load does not read, text in a database whose character set is not UTF-8) fails with ADBC_STATUS_NOT_IMPLEMENTED before anything is sent: no table is created and, for replace, the old table is not dropped.

The Python DB-API connects with autocommit off, so auto uses INSERT there unless you connect with autocommit=True (see Examples).

When an ingest fails​

Version

Since ArpeOracle v0.4.1.

A failed adbc_ingest removes what the call itself created, then returns the original error (its status, SQLSTATE and ORA vendor code unchanged):

  • The schema cannot be created: a column whose Arrow type no Oracle column holds (float16, decimal256, …) or a column without a usable name (empty, or holding a double quote) fails with ADBC_STATUS_NOT_IMPLEMENTED before anything is sent: no table is created and, for replace, the old table and its rows are kept.
  • The call created the table (create, replace, or create_append when the table did not exist): if a later step fails (loading the rows, or the spatial metadata and index of a geoarrow.wkb column), the driver drops what it created, the table and its rows included (DROP TABLE ... PURGE). The same ingest can then be retried as it was. For replace, the old table was already dropped by the call, so no table remains.
  • The table already existed (append, or create_append on an existing table): the table and its rows are never dropped. Rows of earlier batches stay as they are: committed with autocommit on, in the open transaction (for the caller to commit or roll back) with autocommit off. With autocommit on, the failed batch itself is rolled back.

If a cleanup step fails, its error is appended to the original message (...; cleanup: DROP TABLE failed: ORA-...).


Connection string (ADO.NET form)​

adbc.arpeoracle.connection_string accepts the ADO.NET Key=Value;… grammar: case-insensitive keywords, quoted values, doubled-quote escapes. The Server keyword additionally accepts an Oracle EZConnect descriptor or a full TNS descriptor (see below). An unknown keyword, or the same option given twice, is rejected.

Keyword(s)Option
Server, Data Source, Host, Address, Addrserver (+ EZConnect host:port/service, a full (DESCRIPTION=…) TNS descriptor, or a tnsnames.ora alias)
Portport
Service Name, ServiceName, service_name, Database, Initial Catalogservice_name
SIDsid
User ID, UID, User, Usernameusername
Password, PWDpassword
Application Name, Appapp_name
Connection Timeout, Connect Timeout, Timeoutlogin_timeout
Socket Timeout, socket_timeoutsocket_timeout
Buffer Size, buffer_sizebatch_size
Number Mapping, number_mappingnumber_mapping
Interval Mapping, interval_mappinginterval_mapping
SSL Mode, sslmodessl_mode
SSL Root Cert, sslrootcertssl_root_cert
Wallet Location, wallet_locationwallet_location
Wallet Password, wallet_passwordwallet_password
Proxy User, proxy_userproxy_user
New Password, new_passwordnew_password
Allowed Logon Version, allowed_logon_versionallowed_logon_version (since v0.4.1)
Encryption, encryptionencryption
Data Integrity, data_integritydata_integrity
Auth Method, auth_methodauth_method
Server=localhost:2484/orclpdb1;User ID=scott;Password=tiger;sslmode=verify-full

Database / Initial Catalog map to the service name — Oracle's unit of connection is a service (or a PDB), and callers coming from the sibling drivers reach for Database first. SID and Service Name are mutually exclusive.

Options with no connection-string or URI form​

Some options exist only as discrete ADBC options:

FormNot available there — set as a discrete option
Neither connection string nor urisdu, statement_cache_size, ssl_server_cert_dn (also read from a descriptor's SECURITY section), ingest_method, ingest_batch_rows, token_location, access_token, token_file, arpeio.adbc.license, arpeio.adbc.license_file
Connection string only (no uri parameter)socket_timeout, batch_size, new_password, auth_method

Connection options (adbc.connection.*) and statement / ingest options are never read from a connection string or uri.


Connection URI​

The standard ADBC uri option takes an Oracle-style URL, so a string copied from other Oracle ADBC tooling works unchanged.

<scheme>://[user[:password]@]host[:port][/service_name][?key=value&…]
  • Schemes (case-insensitive, equivalent): oracle:// and the branded arpeoracle://. The scheme only selects the URL grammar — it never picks the driver, so oracle:// never collides with another Oracle ADBC driver installed alongside this one.
  • The path segment is the Oracle service name. Use ?sid=<SID> for the SID CONNECT_DATA form instead; giving both a service name (path or ?service_name=) and a ?sid= is rejected.
  • userinfo, host, and query values are percent-decoded; query values treat + as a space. Bracketed IPv6 hosts use [::1]:1521.
  • For the ADO.NET key=value; form, use connection_string, not uri (a uri without a scheme:// is rejected with a pointer to connection_string).

Query parameters (names are case-insensitive; unknown or repeated parameters are rejected). Host and port come from the authority part, not from a query parameter:

Parameter(s)Option
userusername
passwordpassword
service_nameservice_name
sidsid
ssl_modessl_mode
ssl_root_certssl_root_cert
wallet_locationwallet_location
wallet_passwordwallet_password
encryptionencryption
data_integritydata_integrity
connect_timeoutlogin_timeout
application_name, app_nameapp_name
number_mappingnumber_mapping
interval_mappinginterval_mapping
proxy_userproxy_user
allowed_logon_versionallowed_logon_version (since v0.4.1)
oracle://scott:tiger@dbhost:2484/orclpdb1?ssl_mode=verify-full&wallet_location=/etc/oracle/wallet
oracle://scott:tiger@dbhost:1521/?sid=ORCL

EZConnect​

Oracle lets a whole connect descriptor be written as host:port/service, and it is what most users reach for. ArpeOracle accepts it wherever a Server is given (discrete server, the Server connection-string keyword):

Server=dbhost                       # host only, service/SID given separately
Server=dbhost:1521/orclpdb1 # host:port/service
Server=//dbhost:1521/orclpdb1 # optional leading //
Server=dbhost,1521 # ADO.NET host,port form (cross-driver muscle memory)
  • The /service suffix sets the service name (use_sid=false).
  • A bare IPv6 literal is rejected rather than mis-parsed — give the host and Port as separate keywords, or use the bracketed [::1] form in a uri.

TNS descriptor​

A full connect descriptor can be pasted verbatim wherever a Server is given (discrete adbc.arpeoracle.server, or the Server / Data Source connection-string keyword) — it is detected by its leading (:

adbc.arpeoracle.server =
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=orclpdb1)))

This is a convenience for callers that already hold a descriptor (e.g. a tnsnames.ora entry copied by hand, or an ODP.NET Data Source). ArpeOracle does not send it to the listener as-is; it decomposes the descriptor into the same server / port / service_name / sid fields the other forms fill, then builds its own descriptor at connect time. Consequences:

  • Keys are case-insensitive; whitespace and newlines between tokens are allowed, so a descriptor formatted as in tnsnames.ora parses.
  • The first ADDRESS must carry PROTOCOL, HOST and PORT, and CONNECT_DATA exactly one of SERVICE_NAME or SID; anything else is rejected.
  • Only the first ADDRESS is used. A DESCRIPTION_LIST / ADDRESS_LIST (failover / load balancing) collapses to its first address — the rest are ignored.
  • Only PROTOCOL=TCP and PROTOCOL=TCPS are supported. TCPS verifies the server by default, as python-oracledb thin does: it sets ssl_mode=verify-full (chain against ssl_root_cert / wallet_location, else the operating system's CA store, plus the hostname check), unless ssl_mode is given.
  • The first SECURITY section is read for the server-certificate checks: SSL_SERVER_DN_MATCH=yes|on|true (or absent) keeps verify-full; SSL_SERVER_DN_MATCH=no|off|false sets verify-ca (chain only); any other value is an error. SSL_SERVER_CERT_DN="CN=…,O=…" sets ssl_server_cert_dn, so the certificate subject is matched against that DN instead of the hostname. Other SECURITY entries (MY_WALLET_DIRECTORY, …) are ignored: give the wallet with wallet_location.
  • An explicit ssl_mode always wins over the descriptor, whichever is set first. A server with a self-signed certificate is reached either with its CA (ssl_root_cert / wallet_location) or with ssl_mode=require (encrypt without verifying; with a CA configured, require still checks the chain).
Behavior change in v0.4.1

Up to v0.4.0 a TCPS descriptor implied ssl_mode=require and never verified the server, and its SECURITY section was dropped. Since v0.4.1 it verifies the server certificate by default: for a server whose certificate does not chain to a trusted CA, configure that CA (ssl_root_cert / wallet_location) or set ssl_mode=require.


TNS alias (tnsnames.ora)​

Version

Since ArpeOracle v0.3.11. Earlier versions do not resolve aliases: give the descriptor itself.

A server that is a bare name (letters, digits, _, ., -, with no port, /service or () and with no service name or SID given anywhere is looked up as a net service name in tnsnames.ora, as OCI, ODP.NET and python-oracledb do:

adbc.arpeoracle.server   = SALESDB
adbc.arpeoracle.username = scott
adbc.arpeoracle.password = tiger

or Data Source=SALESDB;User Id=scott;Password=tiger.

The file is searched in this order; the first one that exists is used:

  1. <adbc.arpeoracle.tns_admin>/tnsnames.ora: when the option is set, only this directory is searched;
  2. $TNS_ADMIN/tnsnames.ora;
  3. $ORACLE_HOME/network/admin/tnsnames.ora.

The entry's value, a (DESCRIPTION=…) descriptor or an EZConnect string, is then handled exactly like one given directly (see TNS descriptor above: first ADDRESS only, TCPS implies ssl_mode=verify-full, or verify-ca with SSL_SERVER_DN_MATCH=no, unless ssl_mode is set, and SSL_SERVER_CERT_DN is honoured). The alias is resolved once, at AdbcDatabaseInit.

Supported in the file: # comments, entries spanning several lines, several names for one entry (SALES, SALES_RO = (…)), case-insensitive names, and IFILE=<path> includes (a relative path is taken from the including file's directory). When a name is defined twice, the first definition wins.

  • A bare name with a service name or SID (server=dbhost + service_name=orclpdb1) is a host, never an alias.
  • If a tnsnames.ora is found but has no such entry, AdbcDatabaseInit fails with TNS alias 'X' not found in <file>. If no tnsnames.ora is found, the name stays a host name and the connect reports that no service name is set.
  • sqlnet.ora is not read: NAMES.DEFAULT_DOMAIN is not appended to the alias (write the full name, e.g. SALESDB.WORLD), and wallet and encryption settings come from the driver options, not from sqlnet.ora. LDAP naming is not supported.

Oracle Cloud Autonomous Database (ADB)​

Version

Since ArpeOracle v0.2.0.

A downloaded ADB instance wallet works as-is (mutual TLS). Point wallet_location at the unzipped wallet directory (which contains ewallet.pem), set wallet_password, use ssl_mode=verify-full, and connect to one of the wallet's _low / _tp / … services on port 1522:

Python
db_kwargs = {
"adbc.arpeoracle.server": "adb.<region>.oraclecloud.com",
"adbc.arpeoracle.port": "1522",
"adbc.arpeoracle.service_name": "<svc>_low.adb.oraclecloud.com",
"adbc.arpeoracle.username": "scott",
"adbc.arpeoracle.password": "tiger",
"adbc.arpeoracle.ssl_mode": "verify-full",
"adbc.arpeoracle.wallet_location": "/home/you/wallet",
"adbc.arpeoracle.wallet_password": "<wallet-pw>",
}

Oracle's cwallet.sso cannot be read — convert it with orapki wallet pkcs12_to_pem -wallet <dir> to produce ewallet.pem. ADB also accepts OCI IAM token and OAuth2 / Entra ID login instead of a password (both still require the wallet for mutual TLS) — see Authentication.


See also​