oracle Troubleshooting

This article contains some troubleshooting points for the oracle probe.
uimpga-ga
This article contains some troubleshooting points for the oracle probe.
Probe Crashes when the Database is Down
Symptom:
I am using the oracle probe to monitor Oracle 12C on my AIX operating system. The probe creates a core file and crashes on launching.
Solution:
Run the following command on the bin prompt:
relink all
This solution applies to Oracle 11g database also.
Running this command will restart your database.
Enable Probe Support on Solaris Zones Setup
Symptom:
I want to deploy a probe on Solaris zones and monitor the checkpoints.
Solution:
Execute the following command to view the number of processes running for the probe:
ps –ef | grep nim
By default, probe is started with the values 
/bin/sh –c
“./oracle_monitor”
- This command starts two processes on the Solaris zones.
To update the execution of the probe, open the
Edit
page of the probe and edit the
Command
parameter to
oracle_monitor
and delete any values in
Arguments
parameter.
Oracle Probe Connection Errors
Symptom:
Test connection in the oracle probe fails with 
Create OCI environment failed with rc = -1" or "OCIEnvCreate failed with rc = -1
error.
Cause:
OCIEnvCreate
returning
-1
indicates that the probe cannot find the oracle client (or does not have read/execute permissions)
.
Solution:
  • Review the oracle (Oracle Database Monitoring) Release Notes for the following:
    • The list of supported Oracle clients and verify that you are using a supported client.
    • The matrix listing different combinations of Server and Client versions that are supported by the oracle probe. If your version of the Oracle Client is different from the supported Server version, then update the client to a supported version.
      The oracle probe requires that the Oracle client matches with the OS (32 or 64-bit) and Oracle DB server version. If the probe is deployed on a 64-bit OS, then the Oracle client must be 64-bit as well.
  • Ensure that the
    oracle_monitor
    probe is deployed on the same computer where the database is installed or on a different computer. If the probe is installed on a different computer, then verify the Oracle client version that is installed on the computer locally. Also, verify the OS version and bit rate (32 or 64-bit) of the server.
  • Also, verify the following items after logging in with the oracle user (you must be logged in as the oracle user instead of root):
    1. Verify that the following variables are set correctly on the computer where the oracle database is installed.
      • ORACLE_HOME
      • ORACLE_BASE
      • ORACLE_SID
      • PATH 
        (should include the ORACLE bin directory.)
      • TNS_ADMIN
      • LD_LIBRARY_PATH
        AIX requires the LIBPATH as well.
      Example settings for the environment variables:
      Find Values:
      [root@masru01-natura-oracle ~]# su - oracle
      [oracle@masru01-natura-oracle ~]$ 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 is set as follows for the preceding commands:
      ORACLE_HOME=/home/oracle/11.2/database
      ORACLE_BASE=/home/oracle
      ORACLE_SID= SIDID
      PATH=/home/oracle/11.2/database/bin
      TNS_ADMIN/home/oracle/11.2/database/network/admin
      LD_LIBRARY_PATH=/home/oracle/11.2/database/lib  
      ****( FOR AIX ONLY)*****
      LIBPATH=/home/oracle/11.2/database/lib                 
      NLS_LANG= 
      You can run the #echo $ORACLE_SID command to verify the default values for your environment. You can use similar commands with the echo command to verify each value. Use the #env or set command to print all the environment variables set currently in the shell environment.
    2. Copy the Oracle
      OCI.dll
      from the Oracle BIN folder to the
      Windows\System32
       folder.
    3. Ensure that you can run 
      sqlplus 
      commands using the command prompt and that you are able to connect
       
      to the database. Also, verify the rights/permissions for the oracle user.
    4. On the device where the oracle_monitor probe is installed, verify that the 
      ORACLE_HOME, ORACLE_SID, 
      and 
      NLS_LANG
       variables are set properly in the Robot environment. You also can verify the variables on the controller>Setup>Environment tab.
      Windows:
      Set the 
      ORACLE_HOME
       path to the directory where the client is installed. For example, C:\oracle\product\10.2.0\client_1
      UNIX or Linux
      :
      • Set the 
        ORACLE_HOME
         path to the directory where the client is installed. For example, /u01/app/oracle/product/10.2.0/client_1.
      • Set the 
        ORACLE_SID
         path to the service identifier name that you configured using the Oracle client.
      • Set the 
        LD_LIBRARY_PATH
         path to the Oracle library directory. For example, /u01/app/oracle/product/10.2.0/client_1/lib.
        For Linux, set the Enforcing Mode as Permissive. Follow these steps to set the Current Enforcing Mode as
        Permissive
        :
        1. Open SELinux Management. The SELinux Administration window appears.
        2. In the Current Enforcing Mode list, click Permissive.
        3. Close the SELinux Administration window.
Troubleshooting
:
  1. Deactivate the probe and try to run the probe using command line. Verify that the
    ORACLE_HOME
    and
    ORACLE_SID
    is set correctly using
    set | grep ORACLE
    or
    set | more
    , before running the probe.
  2. Ensure that the local firewall is disabled. To verify the status of firewall, use the command:
    service iptables status
    or 
    service iptables stop
     to disable the firewall (Linux). For a different OS, different commands may apply.
  3. The oracle client should work properly when the environment variables are set correctly. You should be able to run
    sqlplus
    and 
    tnsping 
    from the command line on the device where the probe and oracle client is installed.
  4. Ensure that the instance name, in the oracle probe, is consistent and follows capitalization rules. Set the probe to match TNS names and the ORACLE_SID in the controller environment.
  5. Manually restart the Nimbus Robot Watcher service from Services Manager in Windows (use niminit stop and start on Unix/Linux) to reload the Robot environment variables.
  6. For an Oracle database with multiple instances/SIDs, configure SID for each connection profile in the probe/instance. Also, specify Service Name and Instance.
  7. Ensure that you add 
    TNS_ADMIN
     to the Robot controller environment. It is the location of the tnsnames.ora and sqlnet.ora 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
  8. Confirm your 
    LD_LIBRARY_PATH
     is correct. For example,
    /XYZ/app/oracle/product/10.2.0/lib:/XYZ/app/oracle/product/10.2.0/network/lib 
    the oracle probe version 4.71 does not support AIX 6 and 7. You need 4.90 or higher.