4.22 MBS_DatabaseStateChange

Use this Knowledge Script to monitor changes in the database state, such as active, passive, or suspended, of the mailbox databases on an Exchange Server in a database availability group (DAG) or an Exchange Virtual Server (EVS). This script raises an event if a database is in a specified state, or moves into a specified state.

A job executed on a database in an Exchange Server 2010, 2013, 2016, and 2019 DAG causes the job to run on all servers in the DAG. However, only the server that currently owns the database monitors that database.

NOTE:

  • Exchange Server 2010, 2013, 2016, and 2019 do not use storage groups.

  • If you run the MBS_DataBaseStateChange Knowledge Script on an Exchange 2007 server, you can only use the database mount parameters found under the Monitor Database Mount State heading on the Values tab. If you run the script on an Exchange 2010, 2013, 2016, or 2019 server, you can use all the parameters on the Values tab.

4.22.1 Resource Objects

  • Exchange2007_MailboxServer

  • Exchange2007_Store_Database

  • Exchange2007_Store_PFDatabase

  • Exchange2010_MailboxServer

  • Exchange2010_Store_Database

  • Exchange2010_Store_PFDatabase

  • Exchange2010_DAG_Databases

  • Exchange2013_MailboxServer

  • Exchange2013_Store_Database

  • Exchange2013_Store_PFDatabase

  • Exchange2013_DAG_Databases

  • Exchange2016_MailboxServer

  • Exchange2016_Store_Database

  • Exchange2016_Store_PFDatabase

  • Exchange2016_DAG_Databases

  • Exchange2019_MailboxServer

  • Exchange2019_Store_Database

  • Exchange2019_Store_PFDatabase

  • Exchange2019_DAG_Databases

4.22.2 Default Schedule

By default, this script runs every 15 minutes.

4.22.3 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

General Settings

Job failure event notification

Event severity when job fails

Set the severity level, from 1 to 40, to indicate the importance of an event in which the MBS_DatabaseStateChange job fails. The default is 5.

Monitor Database Mount State

Event Notification

Raise event if database is unmounted?

Select Yes to raise an event if a database is unmounted. When a database is unmounted, the Exchange Server cannot store information in it or read information from it. The default is Yes.

Raise event only when database first becomes unmounted?

Select Yes to raise an event only when the database first becomes unmounted. The default is Yes.

Event severity when database is or becomes unmounted

Set the severity level, from 1 to 40, to indicate the importance of an event in which the database is or becomes unmounted. The default is 5.

Data Collection

Collect data for database mount state?

Click Yes to collect data for charts and reports. When enabled, data collection returns the mount status for each monitored mailbox and public folder database. A mounted mailbox or database has a value of 100, while an umounted mailbox or database has a value of 0. The default is No.

Automatically mount database if it is currently unmounted?

Select Yes to automatically mount a database that is currently unmounted. The default is No.

Raise event if database is successfully remounted?

Select Yes to raise an event when the database has been successfully remounted. The default is No.

Event severity when database is successfully remounted

Set the severity level, from 1 to 40, to indicate the importance of an event in which the database has been successfully remounted. The default is 25.

Raise event if database fails to mount?

Select Yes to raise an event if the database you want to automatically mount fails to mount. The default is no.

Event severity when database fails to mount

Set the severity level, from 1 to 40, to indicate the importance of an event in which the database you want to automatically mount fails to mount. The default is 5.

Monitor Database Copy State

Event Notification

Raise event if database copy is suspended?

Select Yes to raise an event if the process of copying a database is suspended. The default is Yes.

Raise event only when database first becomes suspended?

Select Yes to raise an event only when the database first becomes suspended. The default is Yes.

Event severity when database is or becomes suspended

Set the severity level, from 1 to 40, to indicate the importance of an event in which the database is or becomes suspended. The default is 15.

Raise event if database copy is removed from server?

Select Yes to raise an event if a copy of the database is removed. The default is Yes.

Event severity when database copy is removed from the server.

Set the severity level, from 1 to 40, to indicate the importance of an event in which the database is removed from the server. The default is 15.

Monitor Database Active/Passive State

Event Notification - Database Instances

Raise event if database is passive?

Select Yes to raise an event if a database is passive. The default is Yes.

Raise event only when database first becomes passive?

Select Yes to raise an event only when the database first becomes passive. The default is Yes.

Event severity when database is or becomes passive

Set the severity level, from 1 to 40, to indicate the importance of an event in which the database is or becomes passive. The default is 25.

Raise event if database is active?

Select Yes to raise an event if a database is active. The default is Yes.

Raise event only when database first becomes active?

Select Yes to raise an event only when the database first becomes active. The default is Yes.

Event severity when database is or becomes active

Set the severity level, from 1 to 40, to indicate the importance of an event in which the database is or becomes active. The default is 25.

Event Notification - Database Collection

Raise event if more than N databases are active?

Select Yes to raise an event if more than the specified number of databases are active. The default is Yes.

Raise event only when more than N databases become active?

Select Yes to raise an event only when more than the specified number of databases become active. The default is Yes.

Event severity when more than N databases are or become active

Set the severity level, from 1 to 40, to indicate the importance of an event in which more than the specified number of databases are or become active. The default is 15.

Threshold - Maximum number of active databases

Set the highest number of databases that can be active before an event is raised. The default is 3.

Raise event if less than N databases are active?

Select Yes to raise an event if less than the specified number of databases are active. The default is Yes.

Raise event only when less than N databases become active?

Select Yes to raise an event only when less than the specified number of databases become active. The default is Yes.

Event severity when less than N databases are or become active

Set the severity level, from 1 to 40, to indicate the importance of an event in which less than the specified number of databases are or become active. The default is 15.

Threshold - Minimum number of active databases

Set the lowest number of databases that can be active before an event is raised. The default is 1.