SQL Mirroring Status Test
Database mirroring is a solution for increasing the availability of a SQL Server database. Mirroring is implemented on a per-database basis and works only with databases that use the full recovery model.
Database mirroring maintains two copies of a single database that must reside on different server instances of SQL Server Database Engine. Typically, these server instances reside on computers in different locations. Starting database mirroring on a database, initiates a relationship, known as a database mirroring session, between these server instances.
One server instance serves the database to clients (the principal server). The other instance acts as a hot or warm standby server (the mirror server), depending on the configuration and state of the mirroring session. When a database mirroring session is synchronized, database mirroring provides a hot standby server that supports rapid failover without a loss of data from committed transactions. A Witness is an optional instance of SQL Server that enables the mirror server to recognize when to initiate an automatic failover. Unlike the two failover partners, the witness does not serve the database. Supporting automatic failover is the only role of the witness.
When the session is not synchronized, the mirror server is typically available as a warm standby server (with possible data loss).
It is hence evident that to prevent any data loss during failover, a database mirroring session should be in the synchronized state and a Witness should be up and running. If one or both the aforesaid conditions are not fulfilled, data loss is bound to occur. This is why, administrators should continuously track the state of every database mirroring session and witness on a SQL server instance. This is where the SQL Mirroring Status test helps.
For each database on a SQL server instance on which database mirroring is enabled, this test reports the current status of the mirroring session of that database, reveals what role that database plays in the mirroring session, and the current state of the witness. This way, administrators are promptly alerted when any mirroring session or witness switches to an abnormal state.
Target of the test : A Microsoft SQL server
Agent deploying the test : An internal agent
Outputs of the test : One set of results for each database on the Microsoft SQL server instance being monitored
|
Measurement | Description | Measurement Unit | Interpretation | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Mirroring state: |
Indicates the mirroring state of this database mirroring session. |
Number |
The values that this measure can report and their corresponding numeric values are as follows:
Note: By default, this measure reports the Measure Values listed in the table above to indicate the current status of a database mirroring session. In the graph of this measure however, the same is represented using the numeric equivalents only. |
||||||||||||||||
Mirroring role state: |
Indicates the role that is currently played by this database in the mirroring session. |
Number |
The values that this measure can report and their corresponding numeric values are as follows:
Note: By default, this measure reports the Measure Values listed in the table above to indicate the database role. In the graph of this measure however, the same is represented using the numeric equivalents only. |
||||||||||||||||
Mirroring witness sate: |
Indicates the current state of the witness in the database mirroring session. |
Number |
The values that this measure can report and their corresponding numeric values are as follows:
Note: By default, this measure reports the Measure Values listed in the table above to indicate the state of the witness. In the graph of this measure however, the same is represented using the numeric equivalents only. |