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, Kerberos, 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: before the database is initialised, a discrete option wins over the same field taken from a connection_string or a uri, whatever the order they are set in; after it, the last value set wins (see Precedence). Every database option can be given in all three forms (since v0.4.3), except server and port, which a uri carries in its authority (oracle://host:port/…) rather than as query parameters.

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​

The three forms set the same fields, so a value lands in the same place whichever form carries it. Which value wins depends on when it is set.

Before AdbcDatabaseInit (the usual case: dbapi.connect(db_kwargs=…), or every option given before Init) the outcome does not depend on the order the options are set in. That matters because the ADBC driver manager buffers the options given before Init and hands them to the driver in an order of its own, not the order they were written in. Each field takes its value from the highest-ranked form that sets it:

  1. a discrete key (adbc.arpeoracle.port, username, …), highest;
  2. adbc.arpeoracle.server (which can also carry the port and service name, as host:port/service or a descriptor);
  3. adbc.arpeoracle.connection_string;
  4. uri, lowest.
Options given before Init, in any orderResult
adbc.arpeoracle.server=h1, uri=oracle://…@h2/svcserver h1, service svc (from the uri)
uri=oracle://h1:1600/svc, connection_string=Server=h2server h2, port 1600 (from the uri)
connection_string=Server=h3:1700/s3, adbc.arpeoracle.port=1800port 1800
adbc.arpeoracle.server=MYDB (alias), adbc.arpeoracle.port=1800the alias's host and service, port 1800
adbc.arpeoracle.sid=ORCL, adbc.arpeoracle.service_name=svcrefused: two discrete keys give one field different values
username=a, adbc.arpeoracle.username=brefused, as above

Two discrete keys that set one field (service_name and sid, which share the service-name field, or an option key and its alias such as username / adbc.arpeoracle.username) must not disagree before Init. Neither ranks above the other, so different values are refused with INVALID_ARGUMENT naming both keys (through the driver manager, AdbcDatabaseInit reports it); the same value twice is accepted. The same key set again replaces its own value.

After AdbcDatabaseInit (AdbcDatabaseSetOption on an initialised database, Python's AdbcDatabase.set_options) each call reaches the driver straight away and the last value set wins: each call (a discrete key, a whole connection_string, a whole uri) applies the fields it carries over whatever was set before, and applies to the connections opened after it. server=h1 then uri=oracle://…@h2/svc connects to h2; the reverse order connects to h1.

In both cases:

  • A connection_string or uri sets only the fields it carries: connection_string=User ID=scott alongside adbc.arpeoracle.app_name=etl keeps the app name.
  • A connection_string or uri is parsed in full before anything is applied: one that is refused (an unknown keyword, a bad value) changes nothing.
  • Within one connection_string or uri, giving the same option twice is an error, under any of its keywords (User ID=a;UID=b is refused, as is a ?user= next to a user name in the authority). The exception is the Server value: an EZConnect host:port/service sets the port and service name, and a Port or Service Name keyword in the same string overrides it if it comes after, or is overridden by it if it comes before.
  • The ssl_mode (and ssl_server_cert_dn) a TCPS descriptor implies is a default, not a value set: an ssl_mode set explicitly through any form wins over it, and a server that takes over without TCPS drops it. See TNS descriptor.
  • service_name and sid share one field: the winning one decides both the name and the CONNECT_DATA form.
Behavior change in v0.4.3

Up to v0.4.2 a discrete option always won over a connection_string or uri, before or after Init, while a uri and a connection_string overrode each other in call order (so through the driver manager, in no defined order). Code that sets options on an already initialised database and relied on a discrete option keeping its value now gets the last value set.

AdbcDatabaseGetOption reads back the current value of any database option under its adbc.arpeoracle.* / arpeio.adbc.* key (an integer as decimal, a boolean as true/false, an unset string as empty), since v0.4.3. The secrets are not readable and return NOT_FOUND: password, new_password, wallet_password, krb5_principal, krb5_password, access_token and arpeio.adbc.license. The uri and connection_string keys are not read back either.


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_password, krb5_spn, krb5_realm, krb5_principal, krb5_password255
ssl_root_cert, wallet_location, tns_admin, krb5_keytab, krb5_ccache, token_location, token_file, arpeio.adbc.license_file1023
ssl_server_cert_dn511
access_token, arpeio.adbc.license8191
a whole EZConnect value in server255
a whole (DESCRIPTION=…) in server8191 (since v0.4.3; 2047 in a connection string before)

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

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: giving both in a connection string or uri, or as discrete options with different values before AdbcDatabaseInit, is rejected (see Precedence).
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>).

A host, service name or SID holding a character an Oracle Net connect descriptor cannot carry ((, ), =, a quote, a backslash, whitespace or a control character) is refused before any network I/O, with an error naming the option (since v0.4.3). An app_name may hold such characters: the server sees it unchanged in V$SESSION.PROGRAM and MODULE.

Client identity. Since v0.4.3 the server sees the client's own identity, as with python-oracledb: V$SESSION.OSUSER reports the OS user of the client (for a Kerberos logon the server reports the principal instead), and the listener log shows the client machine and OS user. Before v0.4.3 OSUSER was the fixed label arpeoracle and the listener log showed the database server's host name.

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) / kerberos / 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). kerberos and token must be set explicitly. kerberos works in the released Linux binary since v0.4.4 and is not available on Windows: see Authentication → Kerberos.
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); use ssl_mode=verify-full.
adbc.arpeoracle.access_tokenJWTOAuth2 / Microsoft Entra ID bearer token, inline. Selects auth_method=oauth2. Requires TLS (since v0.4.1); use ssl_mode=verify-full.
adbc.arpeoracle.token_filepathSame OAuth2 bearer token, read from a file (inline access_token wins if both are set).
adbc.arpeoracle.krb5_cred_modeccache (default) / keytab / passwordKerberos: how the ticket is obtained.
adbc.arpeoracle.krb5_ccachepathKerberos credential cache for ccache mode (else the ambient kinit ticket, KRB5CCNAME).
adbc.arpeoracle.krb5_keytabpathKerberos keytab file, for keytab mode (service accounts).
adbc.arpeoracle.krb5_principalnameKerberos client principal (keytab and password modes).
adbc.arpeoracle.krb5_passwordstringPassword used to obtain a ticket (password mode).
adbc.arpeoracle.krb5_spnSPNService principal of the database, e.g. oracle/db.example.com. Default oracle/<host>.
adbc.arpeoracle.krb5_realmrealmDefault realm, when the principal carries none.
adbc.arpeoracle.krb5_forwardtrue / false (default)true forwards (delegates) the user's ticket-granting ticket to the database server, for database links or onward use; needs a forwardable ticket. Off, no credential is delegated.

The krb5_* options apply to auth_method=kerberos; in a connection string they are also spelled Kerberos Cred Mode, Kerberos Cache, Kerberos Keytab, Kerberos Principal, Kerberos Password, Kerberos SPN, Kerberos Realm and Kerberos Forward.

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. A certificate attribute value holding a NUL byte matches nothing. 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, and TLS 1.3 is used whenever the server supports it. 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. What a connection's handshake negotiated can be read back: see Driver information.

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.

Unverified TLS stops eavesdroppers but not an active man in the middle. With the token or OAuth2 logons that attacker can capture the token, so use verify-full there (see Authentication).

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).
adbc.arpeoracle.data_integrity_typessha256,sha1 (default) / sha256 / sha1 / sha1,sha256Integrity algorithms offered (Oracle's SQLNET.CRYPTO_CHECKSUM_TYPES_CLIENT): a comma-separated list, each algorithm at most once. See "Choosing the integrity algorithm" below. Since v0.4.3.

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.

Choosing the integrity algorithm (since v0.4.3). The driver offers SHA-256 and SHA-1 by default, and the server picks among the algorithms offered, by its own preference order (its SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER list, or a built-in order when that is unset); the order of the client's list does not matter. With default server settings, Oracle 21c XE picks SHA-1 and 23ai / 26ai picks SHA-256. To keep SHA-1 out, restrict the list on either side:

  • client: adbc.arpeoracle.data_integrity_types=sha256 (also Data Integrity Types in a connection string and data_integrity_types in a uri);
  • server: SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER = (SHA256) in its sqlnet.ora, which every client then gets.

An empty list, an unknown algorithm or a repeated one is refused with an error naming the option. A server that selects an algorithm left out of the list is refused.

A restricted list needs data_integrity=required. With the default accepted or with requested, a server that has no algorithm in common with the list does not fail the connect: it turns integrity off and the session runs without a checksum (with encryption=requested/required the driver then refuses the encrypted session without integrity, see above). Only data_integrity=required turns "no common algorithm" into an error: ORA-12650, whose message names the algorithms offered and the option.

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 Batch Size or 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. Since v0.4.3 it is also the SDU connection-string keyword and the sdu URI parameter (a database option only before).

Type rendering (read path)​

OptionValuesMeaning
adbc.arpeoracle.number_mappingstring (default) / double / decimal:P,SHow Oracle's unconstrained NUMBER maps to Arrow. string → lossless utf8 (named string since v0.4.4; auto, its name before, stays accepted as a deprecated alias); 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.
adbc.arpeoracle.unsupported_typeserror (default) / binaryWhat a column of a type the driver cannot decode does (since v0.4.4). error → the query (and GetTableSchema / ExecuteSchema) fails, naming the column and its Oracle type; binary → the column reads as Arrow binary holding the value's raw bytes (the image of an object type the driver cannot decode, such as a NOT FINAL type, or of a flexible-format vector), NULL staying NULL, with ARPEORACLE:type and ARPEORACLE:raw=true in the field metadata, and the other columns unchanged. A BFILE, a REF CURSOR and an unknown type number are refused either way. 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. The tls.* options since v0.4.5.

Option / codeMeaning
adbc.arpeoracle.openssl_versionRead-only (AdbcDatabaseGetOption, no licence or connection needed): the OpenSSL the driver runs with, e.g. OpenSSL 3.5.9 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.
adbc.arpeoracle.tls.versionRead-only connection option (AdbcConnectionGetOption): the TLS protocol version the connection's TCPS handshake negotiated, e.g. TLSv1.3.
adbc.arpeoracle.tls.groupRead-only connection option: the key-exchange group, e.g. X25519MLKEM768 (hybrid post-quantum, offered first by the released binaries and used when the server supports it) or x25519.
adbc.arpeoracle.tls.cipherRead-only connection option: the cipher suite, e.g. TLS_AES_256_GCM_SHA384.

The three tls.* options are "" before the connection's session opens and on a plain TCP connection; setting one is refused. Setting the environment variable ARPEIO_ADBC_LOG_TLS=1 also prints one line on standard error after each successful TLS handshake, and never key material:

arpeoracle: TLS <version> group <group> cipher <cipher> peer <host>

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. Settable since v0.3.12 (read-only before). See below for reading it and for setting it before the connection is initialised.

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; the read-only adbc.arpeoracle.tls.* keys with INVALID_ARGUMENT).

Since v0.4.4, for adbc.connection.db_schema:

  • Reading it asks the session for its current schema (SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA'), opening the session if needed). It therefore reports the schema last set, one moved by an ALTER SESSION SET CURRENT_SCHEMA run as SQL, the proxy user's schema with proxy_user, and the schema of a Kerberos, token or OAuth2 logon. Before v0.4.4 it returned the schema last set through the option, or the login user name in upper case. With no reachable server it reports the connect error. Before the connection is initialised it returns the name set so far, or an empty string.
  • It can be set before the connection is initialised, for example dbapi.connect(..., conn_kwargs={"adbc.connection.db_schema": "HR"}) in Python. The session then opens at AdbcConnectionInit, which applies the schema and fails with NOT_FOUND if it does not exist.
  • It can be read and set between the batches of an open result stream, as can GetStatistics and ExecuteSchema, like GetObjects, GetTableSchema and GetInfo already could. Only ExecuteQuery / ExecuteUpdate are refused while a result stream from the same connection is open.

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.direct_path_parallelfalsetrue makes a direct path load a parallel load, as SQL*Loader PARALLEL=TRUE does: it locks the table in shared mode, so loads from several connections into the same table run at the same time instead of one after the other. The table must have no index. Also accepted as a database option, as the default for every statement. See Parallel direct path load. Since v0.4.2.
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, direct_path_parallel 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, adbc.ingest.temporary tables and a table the ingest creates with a CLOB / BLOB column (for values longer than VARCHAR2 / RAW hold, since v0.4.4; see Data types) 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, a CLOB / BLOB column it would create) 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).

A cancel that lands during a direct path load aborts the load with CANCELLED and keeps the session (since v0.4.3): with autocommit off, the next statement runs without a Rollback. A cancel that lands while the load is finishing is CANCELLED with SQLSTATE 08007 and a message saying the load may have been committed: check the table before loading again.

Parallel direct path load​

Version

Since ArpeOracle v0.4.2.

A direct path load locks its table exclusively, so N connections loading the same table, each with a slice of the data, load one after the other. With adbc.arpeoracle.direct_path_parallel=true on each of them, every load locks the table in shared mode, writes into its own new extents and merges them at its commit, so the N loads run at the same time. On Oracle 19c, 59,986,052 LINEITEM rows loaded by 4 connections took 14.6 s, against 39 s without the option (and 39.9 s for one connection).

  • The table must have no index, unique or not: the server refuses a parallel load into an indexed table (ORA-26002). direct_path then fails with ADBC_STATUS_NOT_IMPLEMENTED, auto falls back to INSERT. Drop the indexes before the load and create them after.
  • Each connection's load is its own transaction: one connection failing does not roll back the others.
  • Each load allocates its own extents in the table's tablespace, so the tablespace needs room for N loads in flight.
  • The option has no effect on the INSERT path.

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, ORA vendor code and error details unchanged):

  • The schema cannot be created: a column whose Arrow type no Oracle column holds (float16, a struct, …) 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 (under the same keyword or two different ones), is rejected.

Every option's short name is a keyword (since v0.4.3): the last part of its option key (adbc.arpeoracle.ssl_mode → ssl_mode, arpeio.adbc.license_file → license_file), and an underscore in it also matches a space, so ssl_mode, SSL Mode and ssl mode are one keyword. The table lists the further keywords; an option missing from it has only its short name (TNS Admin, SDU, Statement Cache Size, Access Token, Token File, Token Location, SSL Server Cert DN, Ingest Method, Ingest Batch Rows, Direct Path Parallel, License, License File, …).

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
Batch Size, batch_size, Buffer Size, buffer_sizebatch_size
Number Mapping, number_mappingnumber_mapping
Interval Mapping, interval_mappinginterval_mapping
Unsupported Types, unsupported_typesunsupported_types (since v0.4.4)
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
Data Integrity Types, data_integrity_typesdata_integrity_types (since v0.4.3)
Auth Method, auth_methodauth_method
Kerberos Cred Mode, Kerberos Keytab, Kerberos Cache, Kerberos SPN, Kerberos Realm, Kerberos Principal, Kerberos Password, Kerberos Forwardthe matching krb5_* option
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​

Since v0.4.3 every database option can be given as a discrete option, as a connection-string keyword and as a uri query parameter. The two exceptions are server and port in a uri: they come from its authority (oracle://host:port/…), and a ?port= is refused with a pointer to it.

Up to v0.4.2 some options existed only as discrete ADBC options:

FormNot available there up to v0.4.2
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, direct_path_parallel, tns_admin, 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.*), the statement options arpeoracle.sdo.* and the adbc.ingest.* options are never read from a connection string or uri. The read-only keys (adbc.arpeoracle.openssl_version, arpeio.adbc.license.status, adbc.arpeoracle.tls.*) have no keyword either.


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, service name, and query keys and values are percent-decoded; query keys and values treat + as a space. An escape that decodes to a NUL byte (%00) is rejected in every one of them, naming the component and never echoing the password (since v0.4.4 for the user, password, host, service name and query keys, where it used to cut the value short silently). 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). Since v0.4.3 every option's short name is a query parameter, as for the connection string (?auth_method=kerberos&krb5_cred_mode=ccache, ?sdu=65535, ?access_token=…), except server and port, which only the authority carries (a ?port= is refused with a pointer to it). Further names:

Parameter(s)Option
user, usernameusername
connect_timeout, login_timeoutlogin_timeout
application_name, app_nameapp_name
batch_size, buffer_sizebatch_size
ssl_mode, sslmodessl_mode
ssl_root_cert, sslrootcertssl_root_cert

Up to v0.4.2 only these parameters were accepted: user, password, service_name, sid, ssl_mode, ssl_root_cert, wallet_location, wallet_password, encryption, data_integrity, connect_timeout, application_name / app_name, number_mapping, interval_mapping, proxy_user and allowed_logon_version.

oracle://scott:tiger@dbhost:2484/orclpdb1?ssl_mode=verify-full&wallet_location=/etc/oracle/wallet
oracle://scott:tiger@dbhost:1521/?sid=ORCL
oracle://dbhost:1521/orclpdb1?auth_method=kerberos&krb5_cred_mode=ccache

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 (within one connection string too), and so does an explicit ssl_server_cert_dn over the descriptor's SSL_SERVER_CERT_DN. Both implied values follow the server: a server without TCPS that takes over (see Precedence) drops them. 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).
  • A whole descriptor may be up to 8191 bytes in every form.
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 stands for the server option: its host, service name or SID and port take the server's place in the precedence.

  • An explicit port wins over the alias's (since v0.4.4; the entry's port always replaced it before), as it does over the port of a descriptor or host:port/service given directly: a discrete adbc.arpeoracle.port, or a Port in the same connection string as the alias, replaces the entry's PORT. A port that ranks below the server option (from a uri) gives way to the entry's. With no explicit port the entry's is used, or 1521 when the entry names none.
  • When it is resolved: an alias set before AdbcDatabaseInit is resolved once, at AdbcDatabaseInit. An alias set after it (AdbcDatabaseSetOption, as server or inside a connection_string) is resolved by that call (since v0.4.4; it was not resolved before), with the tns_admin in effect, and the last value set wins: the entry's port replaces one set earlier, a port given in the same call or later replaces the entry's. An unknown alias fails that call and leaves the options unchanged.

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​