Topic: Using the Oracle Call Interface[ features ] [ additional information ] [ links ] [ books ] |
Having recently completed the first draft of the Oracle database adaptor for the wftk, I
wanted to get some of what I learned into a little topic so I don't forget it. First, there is a lot of chaff in and around Oracle. I
was struck with the sheer mass of stuff that the developer installation put onto my hard drive. If you've looked at anything I've
done, you'll note that I don't care for Java or for code bloat. Oracle seems to be on some kind of Java code bloat crack high or something.
So, OK, the sarcasm is out of my system now. I want to say that once you figure out which parts of all that are actually useful (the OCI: Oracle Call Interface), Oracle is pretty darned neat. This isn't the first time I've worked with Oracle (I've done lots of Oracle work in Perl via the DBI interface) but it was the first time I'd even come close to exploring what it can do. The object storage functionality looks sweet. Not that I used it. Not that I'd feel comfortable using it at all, for $40,000 a pop per Oracle installation. But boy, I'd like to write a comparable API on top of PostgreSQL, that I would. So the title of the topic is "Using the Oracle Call Interface." That's obviously what I ended up doing. Oracle has all their documentation online at their TechNet, which is free of charge (although you do need to register to use it, which bothers me not one tiny smidgen.) So in about two and a half days I was able to figure out how to translate the wftk taskindex adaptor into Oracle from its original ODBC beginning. (On the way I enhanced it. I love rewrites.) What I really want to do with this topic is write down some of the gotcha's I discovered while working with OCI. There aren't a whole lot. For some good sample code, you can study my adaptor implementation at the wftk site.
To use OCI (at least in Versions 8 and 9), you include The main set of documentation for the OCI interface at TechNet is at http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96584/toc.htm, or at least it is right now. It's well-written documentation. Besides the list of actual functions, I found Chapters 4 and 5 particularly illuminating and well worth reading a couple of times (after you've failed to code something correctly, these chapters really make sense.) The sample code was a good initial help, but there were a few things that don't appear in the sample code. Here are a few of my insights about how to make it all make sense. You realize, of course, that this topic is mostly for me, the next time I have to write some Oracle code. I hope it's useful for you, too.
|
|
|