How to control mailbox database automatic failover process
While performing planned maintenance activity on Exchange servers you may want to prevent the DAG mailbox databases to failover to another mailbox server due to obvious reasons. However, not always you would like this failover to happen automatically, rather you want to keep a tab on how and when a mailbox database should failover and where to failover. In other word, we should have control on failover of a database, and this can be achievedÂ by restricting the automatic databaseÂ failover settingsÂ .
This blockage can be created on two levels:
A) Server â€“ This prevents automatic activation for any database copy hosted on that server;
B) Database â€“ This prevents automatic activation for a specific database copy hosted on a specific server.
Note: To check the current status of a mailbox database automatic failover setting , use the following command :
Â Â Â Â Â Â Â Â Â Â Get-MailboxServer <Mailbox Server Name> Â | ft name,*databasecopy* -auto
To block all database copies on DAG member <Mailbox Server> from becoming activated automatically, use the following command:
Set-MailboxServer â€“IdentityÂ <MailboxServere> -DatabaseCopyAutoActivationPolicy Blocked
Note:Â To prevent cross-site activation you can also use IntrasiteOnly instead of Blocked
To enable all database copies on a DAG memberÂ for automatic activation again, use the following command:
Set-MailboxServer â€“identity <Mailbox Server> â€“DatabaseCopyAutoActivationPolicy Unrestricted
To block automatic activationÂ of aÂ database on a specific serverÂ , use the following command:
Suspend-MailboxDatabaseCopy â€“identity <DatabaseID>\<ServerID>Â Â â€“ActivationOnly
To enable automatic activation again for this database copy on the specified server, use the following command,:
Resume-MailboxDatabaseCopy â€“identity <DatabaseID>\<ServerID>