Oracle, why dost thou sucketh so prodigiously?
We’ve picked up a few larger contracts recently. In such cases the customer has been around for a while, which means they have a legacy app that needs to be supported. This is something we can handle – we specialise in tailored solutions that help leverage your existing assets while synergising with your expanding customer base, to enhance ROI and… oh where was I?
Yeah, so we’ve got customers that want Oracle installed. As I expect you know, Oracle has a long history of being enterprisey, seeing a lot of use on Big Iron hardware. It’s usable on cheap x86 hardware now, and there’s even a free edition if you want to play with it yourself (named Express Edition, much like MS SQL Server). The merits of having a toy-sized version of “enterprise” grade software seem questionable to me, but whatever.
So while we’re talking about “enterprise grade” software (to go with your enterprise support), I’d like to share some snippets of our experiences of making this enterprise-grade software work sanely. To be clear, this isn’t something we do a lot of. We have our own ways of doing things on our own systems, and more often than not, the server isn’t single-purpose (it just doesn’t make sense). That said, we have reasonable expectations of our software and how it should behave. Let’s call this “integration”, and it’s clear that they haven’t done much work on this for Linux.
Let’s start with the installer. For the Enterprise Edition, it’s a 765MiB CPIO archive. What the hell is this, seriously. It feels like a gigantic initrd. That’s the installer for version 10.2.0.1; then there’s the update patch to 10.2.0.4. At least that’s a zip file, but it’s 1.2GiB!
One of my colleagues handled the installation for that, it took him a couple of days of banging his head against the wall trying to make it Just Work. The installer is some GUI-based piece of horribleness that required installing a slew of X-related packages so the pretty installer could run. Maybe it’s an enterprise thing, but we don’t sit at a little monitor attached directly to the server, so some trickery had to be used to funnel everything to a VNC session. I guess Oracle expects you to install a full desktop environment on your big iron server as well. Once working, much time was spent dismissing popups letting us know that something wasn’t quite as expected.
Meanwhile, I’ve been working on the initscript. We need this to work properly as we intend to use it with Heartbeat, a failover management tool for Linux. To my joy, I discovered that they eschew all conventions and always return a zero error code, ie. nothing ever goes wrong. Better yet, they discard all output from the subcommands and hide the fact that there’s ever any problems. Whoever was writing this, I suspect the conversation went like this:
Okay, here’s what we’re gonna do. First, setup a LOG variable, so we can use it later:
Note that I haven’t actually defined ORACLE_HOME_LISTNER anwhere, nor have we sourced any other config files yet. Also, I made a typo in the name.
Now get this, this is the best part: we then proceed to NOT USE THE DAMNED LOG VARIABLE ANYWHERE!
Oracle has a pretty high opinion of itself, too, creating a file called /etc/oratab – yep, it’s right up there on the scale of importance, in the echelons of filesystems, raid volumes and the init process.
I think the best part of all this is the command shell. MySQL users will be familiar with the mysql command, and Postgres has psql. Oracle has sql*plus (yes, it has an asterisk in the name). From what I’ve read this isn’t the preferred way to get things done (you have a shiny GUI for that instead), but dammit, a command line is not a bad way to get things done sometimes. Or even a lot of the time. In any case, and whatever their excuses, sql*plus is absolute crap for what’s meant to be enterprise-grade software.
I understand that Oracle isn’t really “native” to linux-y systems, but would it have killed them to add readline support to the damn thing? This means you have no tab-completion, no ability to recall previous commands, and the only way to edit the current command is with the backspace key. The accepted standard way to get these features is to use rlwrap.
At least once it’s up and running we hopefully won’t have to touch it. The improved initscript is actually useful now, giving meaningful return codes and feedback on what it’s done. Huzzah!