So around 1999 I started working with Oracle and back in those days I was just doing Coldfusion development and using Oracle as a backend. I did this using the typical stack of software, Windows NT, IIS, oracle client, and Coldfusion. Well I soon moved on to the Java world and did a bunch of integration type applications that always talked back to our Oracle database. We actually had to purchase a commercial Oracle driver (not from Oracle) for Java to effectively talk to Oracle. This was a real pain-in-the-[explicit -word]. Since then I decided that databases should be opensource and most people using oracle were much better off with PostGres or even MySQL in some cases.
This week I was forced back into the world of Oracle. So here I am trying to get Python to talk to Oracle. Again just as a client, I was shocked at how painful it was to setup. I’ll admit this might be ignorance on my part, but I’m used to postgres or MySQL just fire up a library and your off in what ever modern language you can imagine.
First off I was told to install the Oracle Client. Seems easy right. Well, you have to hack around Oracle’s installer program if you are running on anything other than there blessed OS’s (Redhat ES and SUSE). God forbid your on Ubuntu or Fedora (see FC3 instructions).
So I decided to look for alternatives. Luckily Oracle knew they would piss people off and offered an Oracle Instant Client. This is just a package with the shared objects and some jar files for my fellow Java friends. It took some time just to find this solution since I wasn’t familiar with Oracle and would have never searched for ‘Instant Client’.
Finally, I was able to download a python module called cx_oracle from a company called Computronix. This package seems to be the best for talking to Oracle (if someone knows otherwise let me know). I was finally able to connect to oracle via Python (assuming those Oracle shared objects are in the LD_LIBRARY_PATH).
My next complaint… Oracle still requires the tnsnames.ora file. It seems odd that I can’t just say connect to this database on this host using this user and password. Maybe I’ve just been used to a simple life of connection strings but this just seems like old Oracle legacy in need of death.
Another complaint. So to download this ‘instant client’ you have to register with Oracle. So I go to the registration page and fill out a bunch of fields. Then I submit my form, pretty typical, except they had this long list of “Spam me with ????”, checkboxes of which I wanted no part of. So I didn’t select any. Then the next page tells me that I didn’t select a subscription and I needed to. I then click the “go back and fix it” link, thinking ok I subscribe to some spam just to get this package. It lost all my information, not only that but if I tried to go back using the browser they have initial javascript that clears out all my previously selected values. After filling the form out again I see why I got the first error message they have a check box titled ‘Please unsubscribe me’, but wait I wasn’t subscribed, ohh well I’ll check that one and it worked. Not only that but I got an email saying I had been un-subscribed from something I had never subscribed to in the first place…
Enough ranting for now! Hopefully this will be helpful to some other lost developers.