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>