DBD::Oracle Installation Guide

This guide describes how to install the necessary components to integrate with a remote Oracle DB database instance with the N2C5 EDR Analytics Module.

You must install these Oracle DB integration components if you wish to use any of the following features of the analytics module ETL processor.

Note that if N2C5 has previously been installed, then you will already have the necessary Oracle components installed.


  1. The target system is Ubuntu (Debian) 12.04 or newer.

  2. The target system is 64-bit.

  3. The target system has package repository access such that apt-get install works. Without package repository access any missing pre-requisite packages will need to be manually copied to the target system and installed using dpkg.

Oracle Instant Client Installation

  1. Access the Oracle Instant Client download page at:

  2. Accept the OTN Licence Agreement.

  3. Download the "Basic", "SqlPlus" & "SDK/Devel" packages. Note that vErsions may differ.

  4. Install the alien program on the target server:

    sudo apt-get install alien
  5. Use the alien program to convert the .rpm packages into .deb format. Note that this step may be done on a representative machine that is not the target machine, but the software versions, OS and architecture must all be equivalent.

    sudo alien oracle-instantclient12.1-basic-
    sudo alien oracle-instantclient12.1-sqlplus-
    sudo alien oracle-instantclient12.1-devel-
  6. Install the .deb packages.

    sudo dpkg --install oracle-instantclient12.1-basic_12.
    sudo dpkg --install oracle-instantclient12.1-sqlplus_12.
    sudo dpkg --install oracle-instantclient12.1-devel_12.
  7. Set the ORACLE_HOME environment variable.

    export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
  8. Test the software installed. Connect to an existing SMF database.

    sqlplus64 smf/smf@<hostname-or-ip-address>/SMF

    If you see the following error:

    sqlplus64: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

    Then you must install libaio with the command

    sudo apt-get install libaio1

    If you receive an error:

    ORA-21561 OID generation failed

    Ensure you add the output of hostname to /etc/hosts, e.g. if running hostname gives richards.nsquared.co.nz, add a line such as: richards.nsquared.co.nz

    to /etc/hosts

Install and Build DBD::Oracle

  1. Retrieve and install the files via cpan:

    export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
    sudo cpan
    install DBD::Oracle

    If you see the following error (this may occur on Ubuntu 14.04 LTS):

    Unable to locate an oracle.mk or other suitable *.mk

    add a link to the demo.mk file to allow the installer to see it:

    ln -s /usr/share/oracle/12.1/client64/demo/demo.mk /usr/share/oracle/12.1/client64/.

    and re-run the installation command install DBD::Oracle.