Tuesday 17 February 2015

Oracle Apache PL/SQL Gateway Module - OWA - mod_owa

The mod_owa Apache module allows you to access an Oracle Database using a webfront end. Download and install Oracle Instant Client for your system from here: http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html On CentOS edit /etc/sysconfig/httpd, or /etc/apache2/envvars on Debian:
export TNS_ADMIN=/etc/oracle
export ORACLE_HOME=/usr/lib/oracle/11.2/client64
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
Create and put you tnsname.ora in the /etc/oracle directory. Download and install mod_owa from here: https://oss.oracle.com/projects/mod_owa/dist/documentation/modowa.htm Create an Apache configuration file as such:
LoadModule owa_module /etc/httpd/modules/mod_owa.so

    SetHandler     owa_handler
    OwaUserid      username/password@ORACLEDBNAME
    OwaDiag        COMMAND ARGS CGIENV POOL SQL MEMORY ERROR THREADS HEADER RESPONSE
    OwaLog         "/var/log/httpd/mod_owa.log"
    OwaAdmin       127.0.0.1 255.255.255.255
    OwaPool        10
    OwaStart       "login"
    OwaDocProc     "doc_pkg.readfile"
    OwaDocPath     docs
    OwaUploadMax   10M
    OwaCharsize    2
    OwaCharset     "utf-8"
    #OwaCharset     "UTF-8"
    #OwaBindset     "UTF-8"
    #OwaUnicode     "FULL"
    order          deny,allow
    allow          from all
    OwaDocTable    ndrd_file_objects BLOB_CONTENT