This article suggests how to troubleshoot and resolve issues related to connecting to an Oracle database with any of the three Uptime Infrastructure Monitor Oracle service monitors (Basic Check, Advanced Metrics or Tablespace Check).
If an Oracle monitor is failing with the message Could not connect to database, check the following points to ensure that the monitor is properly configured:
- Review tnsnames.ora from the Oracle server being contacted.
- Find corresponding SID entry in the file (the SID field in the Oracle service monitor needs to match the GLOBAL_NAME field, or if it isn't set, the SERVICE_NAME field in tnsnames.ora).
- Make sure the port matches.
- Make sure the necessary firewall port exceptions are in place on the OS and networking devices between Uptime Infrastructure Monitor and the Oracle database server.
If the connectivity issue still persists, try the following steps, which should generate some messaging that will provide further insight on the root cause of the issue:
- Log into Oracle with the same user account that Uptime Infrastructure Monitor is configured to use to see if any warnings or errors are returned.
- On the Uptime Infrastructure Monitor Monitoring Station server, change the loggingLevel from INFO to DEBUG in <uptime_dir>/uptime.conf to provide further logging (restart the up.time Data Collector or uptime_core service for the change to take effect). The increased logging can be reviewed in <uptime_dir>/logs/uptime.log.