Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

What's the difference between jdbc oci and jdbc thin?


Asked by Remy Rodgers on Dec 06, 2021 FAQ



While all Oracle JDBC drivers are similar, some features apply only to JDBC OCI drivers and some apply only to the JDBC Thin driver. JDBC Thin client-side driver: This is a JDBC Type 4 driver that uses Java to connect directly to Oracle. It implements Oracle's SQL*Net Net8 and TTC adapters using its own TCP/IP based Java socket implementation.
Additionally,
From the server standpoint there is no difference between the two. The JDBC thin driver is 100% Java and comes in a single standalone jar (some extra jars will be needed for advanced features). The JDBC OCI driver makes JNI calls to the OCI C client library and hence depends on the Oracle full client to be installed (OCI is also what sqlplus uses).
Also, JDBC Thin server-side driver: This is another JDBC Type 4 driver that uses Java to connect directly to Oracle. This driver is used internally by the JServer within the Oracle server. This driver offers the same functionality as the client-side JDBC Thin driver (above), but runs inside an Oracle database and is used to access remote databases.
Consequently,
In this driver, performance was improved by reducing the communication layer. Instead of talking to the ODBC driver, the JDBC driver directly talks to the DB client using native API. That's why it's also known as native API or partly Java driver.
In this manner,
The JDBC OCI driver generally requires an Oracle client-installation of the same version the driver. However, JDBC OCI driver is available with OCI Instant Client feature, which does not require a complete Oracle client-installation. Please refer to the documentation on OCI Instant Client install.