Data Guard role switch


Job details

Name: Data Guard role switch
Platform: Oracle
Category: Cluster and Replication
Description: Checks size of all snapshot logs.
Long description:
Version: 1.5
Default schedule: 60s
Requires engine install: No
Compatibility tag: .[type=‘instance’ & databasetype=‘oracle’]

Parameters

Name Default value Description
return_status 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when Primary/Standby switch occurs.
keep_status 10 For how long (in minutes) the jobs status will be kept when Primary/Standby switch occurs.

Job Summary

select database_role from v$database;

Job Mechanics

Output and Reporting

Field Detail
Status Indicates the current alarm status based on role switch detection
Details Provides descriptive text about the current Data Guard role and recent switch activities. For example, messages like “Running as PRIMARY host. Last switch 10 minutes ago.” are dynamically generated based on the context.
Last Data Guard Status Stores the last known state of Data Guard to compare against new fetches
Last Data Guard Switch Timestamp for the last detected role switch, used for calculating time elapsed
Last Data Guard Switch Count Counter that increments with each detected switch, useful for historical context

Scenario Handling

This meticulous monitoring ensures the robustness and readiness of Oracle databases configured with Data Guard, facilitating high availability and disaster recovery configurations.