Monthly Archives: September 2018

Open Source ODBC Drivers for Oracle

In the good old days, database-agnostic applications were written using drivers that implemented the Microsoft Open Database Connectivity (ODBC) API, especially on Windows. Much like JDBC, ODBC provided developers with a single, interoperable, C-based programming language interface that made it possible for applications to access data from a variety of database management systems.

When developing an ODBC-based application with Oracle, there were a variety of drivers to choose from including:

While several of these companies offer wire-protocol implementations of their drivers, which didn’t require Oracle Client, the majority of supportable ones (or ones that required advanced functionality) are based on top of the Oracle Call Interface, including the Oracle ODBC driver itself. With the exception of Oracle’s driver, however, the other commercial drivers are rather expensive. So much so, in fact, that I’ve seen companies pay almost the cost of a database license just to deploy the driver across their enterprise.

To get around this, several open-source ODBC drivers for Oracle Database had been developed. The two most notable drivers are as follows:

Easysoft ODBC Driver for Oracle (in C)
First, before it became a commercial product, Easysoft released their driver as open-source. Like other ODBC drivers for Oracle available at the time, it was based on top of OCI. Over the years, however, this seemed to get lost. For that reason, when I ran across the code for it in my archive the other day, I figured I’d upload it to GitHub for all the world to see. You can find it here. Thanks to the legal principle of promissory estoppel, while the C code is no longer publicly available from Easysoft, the Easysoft Public License (EPL) which it was originally distributed under is still applicable. The EPL appears to be very Apache-like in nature, permitting inclusion in a commercial application as long as any changes to the driver itself are made available and the copyright acknowledgement is made.

EDO Driver for Oracle (in C++)
This driver was written by Edwig “Edo” Huisman, who ran into a number of the bugs and limitations found in the ODBC driver for Oracle9i and who also found the commercial offerings to be too expensive. Unlike the Easysoft driver, which is designed for UnixODBC, I’ve never tried to compile this on UNIX/Linux. I do think, however, someone with a little C++ and ODBC driver development knowledge could easily get it to compile within a day or so. While it’s currently released under the GPL, Edwig has said he’s looking to re-license it under something more liberal–perhaps even the MIT license–provided portions of the code are re-written. While the project for this is on SourceForge, you can find my repo of the code here.

The last update to the open-source Easysoft driver was made in 2002 and, of the two, Edo’s driver is certainly more readable, recent, and well-tested. Likewise, Edo seems to be a pretty responsive and good guy. If I find time, I’d like to get his driver going on UNIX/Linux.

A Word About Wire-Protocol ODBC Drivers
Having reached out to the authors of these drivers to offer licensing of my own protocol stack, the response from many suggests they have done an almost verbatim copy and source-to-source translation of the wire protocol code from Oracle’s JDBC driver. While this certainly isn’t a legal form of reverse engineering, I guess they’re not big enough for Oracle to go after. Likewise, while every one of these drivers will work with newer versions of Oracle, they all appear to use rather antiquated calls emulating the JDBC driver and don’t take advantage of many improvements in OCI over the years. YMMV.