Description
-----------

    This small remote SQLPlus Query plugin for Pandora FMS Plugin Server.

Requirements
------------

    Oracle Database or Oracle Client (for the command-line SQL*Plus or Windows GUI interfaces only).

    For Oracle Client you must have downloaded RPM Packages for your desired version. 

1.- Download those packages:

- oracle-instantclient12.1-basic-12.1.0.1.0-1.x86_64.rpm
- oracle-instantclient12.1-sqlplus-12.1.0.1.0-1.x86_64.rpm
- oracle-instantclient12.1-devel-12.1.0.1.0-1.x86_64.rpm

2.- As root set your directory to downloaded RPM Packages and execute:

[root@HOST ~]# yum localinstall oracle* --nogpgcheck

3.- Create a file called tnsnames.ora(http://www.orafaq.com/wiki/Tnsnames.ora).
    Create your admin directory:
	[root@HOST ~]# mkdir 	/usr/lib/oracle/12.1/client64/network/admin -p
    Put your tnsnames.ora in this folder.

4.- Create file /etc/profile.d/oracle.sh :
	export ORACLE_HOME=/usr/lib/oracle/11.2/client
	export PATH=$PATH:$ORACLE_HOME/bin
	export LD_LIBRARY_PATH=$ORACLE_HOME/lib
	export TNS_ADMIN=$ORACLE_HOME/network/admin

    Logout and login, and run sh /etc/profile.d/oracle.sh

5.- Test if Oracle Client and tnsnames.ora works properly:

	[root@HOST ~]# sqlplus username@ALIAS_IN_TNSNAMES_ORA

Author
------

    Roberto Sotillo Hidalgo

Syntax
------

    perl sqlscript.sh 'User' 'Password' SID 'Query'

Sample of usage
---------------

    sqlscript.sh 'artica' 'pandoraFMS' tagente 'select sysdate from dual;'