Building Perl DBD::Oracle RPM packages for Enterprise Linux

Introduction

One of the many “hats” I wear in my job is an Oracle database administrator. In this role I write a number of Perl scripts that interact with the Oracle DB, and are used for purposes such as updating data and automating maintenance tasks. Over the years I’ve built up a fairly large library of scripts that I can clone off of when I need something new. With Perl and Oracle, one uses the DBI module for Oracle, DBD::Oracle. I’ve mostly used this on Red Hat systems—Enterprise Linux or EL, as I will refer to it here—distributed with an RPM package (instead of being installed using CPAN). Perhaps because it requires the installation of closed-source Oracle software, there aren’t pre-built RPMs of DBD::Oracle; I’ve always had to build these myself, using an RPM spec file I inherited from a colleague. However, I’ve wanted to revisit this and find a spec file from a source outside of work, one that I could use for experimentation in personal projects, as well as providing an improved version for my work. I was able to find a spec file from a public source, make some improvements, and build the packages for Enterprise Linux versions 7 through 10. This post documents those steps.

Continue reading

Compiling Perl DBD::Oracle on Solaris 2.6 and writing some Perl scripts

One of my goals in my recent experimentation with Oracle and Solaris was to write some programs that could query and modify the data in a database. In my time as a systems administrator, I have written a number of Perl scripts that query Oracle using the DBD::Oracle module. For my lab experimenting, I wanted to be able to write scripts that could run against the late-90s Oracle 8i I installed on Solaris 2.6. Until now, my efforts at getting the DBD::Oracle module compiled on Solaris with the 8i client have failed. In this post I will write about how I finally got this to work.

Continue reading

Running Solaris 2.6 under the QEMU SPARC32 Emulator and installing Oracle 8i

Following up on my previous post, Running Solaris 8 and 9 under the QEMU SPARC32 Emulator, I decided to try running Sun Solaris 2.6 in the QEMU SPARC32 Emulator. Someone has graciously shared the CD images for both the SPARC and X86 Solaris 2.6 images out on the Internet Archive. I also installed the Oracle 8i database server and connected to it from Solaris 9 QEMU machine. My ultimate goal in this exercise was to query Oracle 8i with the Perl DBD::Oracle module, but I ultimately failed at this. More on this later. This post will be similar to my other one on Solaris 8/9 in QEMU, so I’m going to skip steps such as how to set up QEMU for this.

Create and format the disk for Solaris

Continue reading