Database Instance Availability Report

A common request from our customers is to get an "Up Time" report from DPA. Although it is not available in the base product, we can use the attached query to mine the repository database and calculate up times for each instance. For this to work, first setup a Database Instance Availability alert which can be found under Alerts > Manage Alerts and choose the Administrative category. I typically run this type of alert every minute so I quickly know when an instance is down. In this case, this alert will also collect data for us and store in the DPA alert tables, and this is the data the attached query works with. Each time the alert executes, it stores a row in the CON_ALERT_HISTORY tables for the status: a value of "NORMAL" means the instance was reachable and any other value means the instance was down.

Download the attached file and execute from the DPA Repository database using a tool like SQL Server Management Studio (SSMS).