Availability
Database availability assists you to conveniently know the availability status of your database in both real-time and historical modes.
Repository table
This metric that provides information on database availability is gathered from the repository table <SCHEMA>.DBSTATUS.
Source
The DB_STATUS information is gathered from IBM Db2® table function MON_GET_DATABASE with parameter -2, for information from all active database members.
Columns
| Column Name | Type | Description |
| SNAPSHOT_ID | BIGINT | Unique ID of the database status row that was inserted. |
| SNAPSHOT_TIME | TIMESTAMP | The timestamp when the database status was collected. |
| DATABASE_NAME | VARCHAR(255) | Name of the database. |
| DB_STATUS | VARCHAR(32) | The status of the database. |
| collectFrequencyInMin | BIGINT | Monitoring data collection interval in minutes. |
Metric calculation
A row is inserted in the repository table DBSTATUS every 5 minutes (by default). The DB_STATUS column indicates the status in each snapshot. The status can be one of the following:
- ACTIVE
- QUIESCE_PEND
- QUIESCED
- ROLLFW
- UNREACHABLE
UNREACHABLE status is returned based on if the connection can be established to the database.
The availability percentage is calculated from the DBSTATUS repository table based on the start and end timestamp provided. The row that is returned from the table is the status of database availability.
(1 – total database unavailable time) * 100 where the total database
unavailable time is the aggregation of collectFrequencyInMin column
from DBSTATUS table for all the rows with DB_STATUS as not
ACTIVE. total database unavailable time = (aggregation of collectFrequencyInMin * 60000)/<end_timestamp> - <start_timestamp>
where <end_timestamp> - <start_timestamp> is the length of the collection
interval in milliseconds. The collectFrequencyInMin is multiplied by 60000 to scale
it to milliseconds.