3.11 DBMirrorStatus

Use this Knowledge Script to monitor the status of each mirrored database. This script raises an event if one of the selected factors associated with the mirrored database changes, such as the mirror state, mirror role, or mirror partner, or if a new database is added or removed from mirroring.

Resource Objects

Microsoft SQL Server

Default Schedule

The default interval for this script is Every 10 minutes.

Setting Parameter Values

Set the following parameters as needed:

Description

How to Set It

General Settings

Job Failure Notification

Raise events if job fails unexpectedly?

Select Yes to raise an event if the SQLServer_DBMirrorStatus job fails unexpectedly. The default is Yes.

Event severity when job fails unexpectedly

Set the event severity level, from 1 to 40, to indicate the importance of an event that is raised when the job fails unexpectedly. The default is 5.

Raise events if SQL Server login fails?

Select Yes to raise an event if login to SQL Server fails. The default is Yes.

Event severity when SQL Server login fails

Set the event severity level, from 1 to 40, to indicate the importance of an event that is raised when the login to SQL server fails. The default is 15.

Additional Settings

Event Details

Event detail format

Select the format in which you want to display the event detail. You can select from HTML Table or Plain Text. The default is HTML Table.

Authentication

Select the authentication method that you want to use to access SQL Server. You can either select Windows Authentication or SQL Server Authentication. The default is Windows Authentication

User name

Specify the Windows or SQL Server user name that you want to use to access SQL Server. You can specify multiple users separated by a comma. The default is none.

For more information on specifying user name, see Specifying the User Name in the Knowledge Script in the Management Guide.

For more information on specifying user name, see Section 2.7.3, Specifying the User Name in the Knowledge Script.

Monitor DB Mirroring

 

Event Notification

Raise an event if Mirror State changes?

Set to Yes to raise an event if the Mirror State changes. The default is Yes.

Event severity when Mirror State changes

Set the event severity level, from 1 to 40, to indicate the importance of the event if the Mirror State changes. The default severity level is 5 (red event indicator).

Raise an event if Mirror Role or Sequence changes?

Set to Yes to raise an event if the Mirror Role or the Mirror Role Sequence changes. The default is Yes.

Event severity when Mirror Role or Sequence changes

Set the event severity level, from 1 to 40, to indicate the importance of the event if the Mirror Role or the Mirror Role Sequence changes. The default severity level is 5 (red event indicator).

Raise an event if Mirror Safety Level changes?

Set to Yes to raise an event if the Mirror Safety Level changes. The default is Yes.

Event severity when Mirror Safety Level changes

Set the event severity level, from 1 to 40, to indicate the importance of the event if the Mirror Safety Level changes. The default severity level is 5 (red event indicator).

Raise an event if Mirror Safety Sequence changes?

Set to Yes to raise an event if the Mirror Safety Sequence changes. The default is Yes.

Event severity when Mirror Safety Sequence changes

Set the event severity level, from 1 to 40, to indicate the importance of the event if the Mirror Safety Sequence changes. The default severity level is 5 (red event indicator)

Raise an event if Mirror Partner changes?

Set to Yes to raise an event if the Mirror Partner changes. The default is Yes.

Event severity when Mirror Partner changes

Set the event severity level, from 1 to 40, to indicate the importance of the event if the Mirror Partner changes. The default severity level is 5 (red event indicator).

Raise an event if Mirror Witness changes?

Set to Yes to raise an event if the Mirror Witness changes. The default is Yes.

Event severity when Mirror Witness changes

Set the event severity level, from 1 to 40, to indicate the importance of the event if the Mirror Witness changes. The default severity level is 5 (red event indicator).

Raise an event if Mirror Witness State changes?

Set to Yes to raise an event if the Mirror Witness State changes. The default is Yes.

Event severity when Mirror Witness State changes

Set the event severity level, from 1 to 40, to indicate the importance of the event if the Mirror Witness State changes. The default severity level is 5 (red event indicator)

Raise an event if no mirrored databases found?

Set to Yes to raise an event if no mirrored databases are found. The default is No.

Event severity when no mirrored databases found

Set the event severity level, from 1 to 40, to indicate the importance of the event if no mirrored databases are found. The default severity level is 25 (blue level indicator).

Raise an event if a new database is Mirrored?

Set to Yes to raise an event if a new database is mirrored. The default is Yes.

Event severity when a new database is Mirrored

Set the event severity level, from 1 to 40, to indicate the importance of the event if a new database is mirrored. The default severity level is 25 (blue level indicator).

Raise an event if a database is removed from Mirroring?

Set to Yes to raise an event if a database is removed from mirroring. The default is Yes.

Event severity when a database is removed from Mirroring

Set the event severity level, from 1 to 40, to indicate the importance of the event if a database is removed from mirroring. The default severity level is 5 (red event indicator).

Data Collection

Collect data for Database Mirroring Role?

Select Yes to collect data for the role of a Mirrored database. If selected, data collection returns the following:

  • 100-- if the database is principal

  • 0-- if the database is mirror

The default is unselected.

Custom data stream legend

Specify a custom data stream legend to append with the default data legend for the job that is visible in the console. You can specify a maximum of 128 alphanumeric characters in a string, including special characters. The default is none.