How to monitor Oracle database?

How do I monitor my Oracle databases?

Q: I can’t figure out how to create monitor for Oracle database(s). Can you help?

A: Add and configure the Oracle DB monitor like in the example below:

Oracle DB Monitor

Use your database name and user credentials, specify an SQL request that returns an integer value.

Let’s check several typical pitfalls and find out information on possible errors.

  1. Please make sure you have installed Oracle client (Basic or Basic Lite, for your platform) 32bit. You should download proper archive, create a new directory (drive C: is recommended), and add the mentioned directory to system PATH. The Oracle client libraries may require MS Visual Studio 10 32bit redistributable to be installed on the monitoring host.
    Note: to modify PATH variable, open My Computer -> Properties -> Advanced System Settings -> Environment Variables button. Select PATH from the list and click “Edit”. Please separate PATH entries with semicolon, leave no extra white spaces.
  2. If no database name you try to use doesn’t match, try running one of (or all three) SQL queries, using the standard Oracle command-line or GUI client:
    select sys_context('userenv','db_name') from dual;
    select ora_database_name from dual;
    select * from global_name;

    Note: all the three should return the same instance name, the one you should use.

  3. Make sure you set up alerts on every Oracle SQL query state changes and make sure that alerting rule chosen is triggered on all occasions (see State Changes section of alerting rule properties, check every one).
  4. Make sure there are no typos in PATH environment variable, to ensure Oracle libraries are found and used. Run cmd.exe and type command “path” to check. Make sure there are no extra whitespace, and all PATH entries are separated by semicolon.
  5. If nothing helps, please poll monitor and send us screenshot of its Log View (make sure Log View is displayed beneath Parameters/Results pane). Please send us also IPHost Network Monitor error logs (all mentioned in that article).
Related topics

How to specify database name for Oracle DB monitor?