Database Server uptime
Job details
Name: | Database Server uptime | |
Platform: | Sqlserver | |
Category: | Availability | |
Description: | Collects database server uptime statistics. | |
Long description: | ||
Version: | 2.2 | |
Default schedule: | * * * * | |
Requires engine install: | Yes | |
Compatibility tag: | .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version = ‘2005′ & hasengine=‘YES’ & (engine_edition = ‘Microsoft SQL Server’ | engine_edition = ‘Azure SQL Managed Instance’)] |
Parameters
Name | Default value | Description |
---|---|---|
week uptime calculation | 24 | Number of hours between each calculation of up-time statistics. |
Job Summary
- Purpose: The purpose of monitoring job for dbWatch Control Center is to collect and maintain database server uptime statistics, ensuring the availability and historical tracking of server uptime across specified instances.
- Why: This monitoring is critical to ensure the stability and reliability of the SQL servers. It helps to guarantee that the servers are operating efficiently without unexpected downtime. Detecting downtime promptly allows for quick troubleshooting and minimizes disruptions to the service. Furthermore, maintaining historical uptime data aids in analyzing trends over periods, helping to plan maintenance or upgrades to avoid peak times of usage or known issue intervals.
- Manual checking: You can check the server uptime manually by querying the uptime history directly from the database. SQL commands used to fetch these statistics include:
```
SELECT server_name, instance_name, startup_time, first_check, last_check, period
FROM dbw_db_uptime_histr
ORDER BY period DESC;
```
Main Components and Structure
- “dbw_db_uptime” and “dbv_db_uptime_histr” tables: Hold current and historical uptime data respectively.
- “db_cluster_uptime” and “db_update_month_uptime” procedures: Utilized to calculate uptime and update records in batch during a specified period.
- Dependency on various tables such as “dbw_db_cluster_periods” and “dbw_db_maintenance_periods” for tracking active sever instances and maintenance periods respectively.
- Reporting enabled through “dbWatch Report Template”: It formats the served data into visual representations like charts and tables for easier interpretation of the database uptime statistics.
- Scheduled default operations: Periodic checks and updates are set to trigger automatically ensuring continuous data accuracy.
Implementation Details
- Implementation: Various procedures are deployed to establish the initial data tables and to ensure periodic updating and housekeeping of the uptime and system status data.
- Error handling: Adequate exception handling mechanisms are in place using SQL TRY-CATCH blocks to manage and log failures during the monitoring process.