If testing a connection in the oracle probe is failing with an error message such as: "Create OCI environment failed with rc = -1" or "OCIEnvCreate failed with rc = -1" follow the instructions below.
OCIEnvCreate returning -1 almost always indicates that the probe cannot find the oracle client (or doesn't have read/execute permissions).
Check the oracle probe Release Notes to see which Oracle clients are currently supported and requirements.
https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/it-operations-management/ca-unified-infrastructure-management-probes/GA/alphabetical-probe-articles/oracle-oracle-database-monitoring/oracle-oracle-database-monitoring-release-notes.html#concept.dita_03df114cfbf63df6852ce5ad3b91546626756a5f_OracleSupportedVersionsandClients
The first piece of information you should collect is whether the oracle_monitor probe is deployed on the same machine where the database is installed or on a different machine. If the probe is installed on a different machine then verify which 'Oracle Client' version is installed on that machine locally, and check the OS version for that server and whether the OS is 32 or 64-bit.
If customer is using zones ensure that the client and server are on the same zone even when they are on the same server.
The Release Notes for the Oracle probe contain a matrix listing the different combinations of Server and Client versions that are officially supported by the oracle probe. If you have any other version of the Oracle Client other than what is supported with your Server version then please update it to one that is officially supported.
The oracle probe requires that the Oracle client 'match' the OS (32-bit versus 64-bit) and Oracle DB server version. If you have a 64-bit OS you are running the probe on. then the Oracle client must be 64-bit as well.
Also, you will need to double-check the items below after logging in with the oracle user (you must be logged in as the oracle user instead of root)
1. Re-verify that the following variables are set on the machine where the Oracle database is installed.
a. ORACLE_HOME
b. ORACLE_BASE
c. ORACLE_SID
d. PATH (should include the Oracle bin directory.)
e. TNS_ADMIN
f. LD_LIBRARY_PATH
NOTE: AIX OS REQUIRES the LIBPATH as well. Please see the latest release notes.
Example on how to find values:
[[email protected] ~]# su - oracle
[[email protected] ~]$ env |grep oracle
HOSTNAME=masru01-natura-oracle
USER=oracle
LD_LIBRARY_PATH=/home/oracle/11.2/database/lib:/lib:/usr/lib:/usr/lib64
ORACLE_BASE=/home/oracle
MAIL=/var/spool/mail/oracle
PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin:/home/oracle/11.2/database/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
PWD=/home/oracle
HOME=/home/oracle
LOGNAME=oracle
ORACLE_HOME=/home/oracle/11.2/database
UIM Environment would be set as follows for the above:
ORACLE_HOME=/home/oracle/11.2/database
ORACLE_BASE=/home/oracle
ORACLE_SID= SIDID
or
Stop firewalld for the current session->systemctl stop firewalld.service
Confirm Firewalld is inactive-> systemctl status firewalld
For a different OS, different commands may apply to do the same.
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client
export ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PATH=$PATH:$ORACLE_HOME/bin
export TNS_ADMIN=$ORACLE_HOME/network/admin
For an Oracle database with multiple instances/SIDs, each SID must be configured for each connection profile in the probe/instance, Service Name and Instance must be specified.
Make sure you add TNS_ADMIN to the Robot controller environment. It is the location of the
tnsnames.ora, sqlnet.ora etc files, for example:
UNIX/LINUX
/XYZ/app/oracle/product/10.2.0/network/admin
Windows:
C:\oracle\product\11.1.0\client_1\network\admin
Confirm your LD_LIBRARY_PATH is also correct, e.g.,
/XYZ/app/oracle/product/10.2.0/lib:/XYZ/app/oracle/product/10.2.0/network/lib
Note that the oracle probe version 4.71 does not support AIX 6 and 7. You need 4.90 or higher.
See below for two screenshots of a sample configuration for the Robot/controller and Oracle connection settings for an Oracle probe installed on the local Oracle database server on an AIX 7.1 machine:
Robot/controller environment (example)
Excerpt from the Robot environment section on the machine where the probe is installed:
<environment>
NLS_LANG =
ORACLE_HOME = /u01/app/oracle/product/11.2.0.4/db_1
ORACLE_BASE = /u01/app/oracle
LD_LIBRARY_PATH = /u01/app/oracle/product/11.2.0.4/db_1/lib
PATH = $PATH:$ORACLE_HOME/bin
TNS_ADMIN = $ORACLE_HOME/network/admin
</environment>
Oracle probe Connection settings (example)