All about Exchange Server Active Manager
Stellar Information Technology Pvt. Ltd.
Global Data Care Experts #1 in India since 1993
Active Manager is an Exchange Server component that helps manage the Database Availability Group (DAG) and mailbox database copies to ensure high availability. It was introduced with Exchange Server 2010 by replacing the Cluster Service consisting of failover management and resource model in Exchange Server 2007.
In this article, we will understand the importance of Active Manager in Exchange Server DAG setup.
Roles of Active Manager in Exchange Server
Active Manager runs as a part of Microsoft Exchange Replication Service (MSExchangeRepl.exe) in a DAG environment consisting of Primary Active Manager (PAM) and Standby Active Manager (SAM) roles.
However, if the mailbox server isn't a member of DAG, the Active Manager runs in the Standalone Active Manager role. Active Manager is a critical Exchange Server component that decides which database copies will be active or passive in the DAG environment.
The Primary Active Manager is responsible for making the passive copies active when the primary mailbox server or database fails. The mailbox server in a DAG that owns the cluster quorum resource or default cluster group holds the PAM role. When the DAG member server that owns the cluster quorum resource fails, the PAM role is automatically moved to the surviving server that takes the ownership of the cluster quorum resource.
Thus, if you ever need to take a DAG server with an active database copy offline for maintenance or backup, you must move the PAM role to another active DAG member server to ensure high availability and avoid downtime.
On the other hand, Standby Active Manager detects and provides information on local databases or information store failures. SAM asks PAM to take over when it detects failure to initiate failover protection.
SAM is available and runs on all the DAG member servers except one where PAM is running. You can quickly check which DAG member server currently holds the PAM role by running the Get-DatabaseAvailabilityGroup PowerShell command with the –Status parameter in the Exchange Management Shell (EMS).
Get-DatabaseAvailabilityGroup –Status | fl Identity, PrimaryActiveManager
The output will display the server name holding the PAM role.
Identity:??????????? DAG01
PrimaryActiveManager: MBXSRV01
You can also check the event log to verify the PAM role change.
Active Manager changed from ‘[PAM|SAM|Standalone] ‘ to ‘[PAM|SAM|Standalone]’ (EventID xxx);
The PAM and SAM are responsible for monitoring the health of mounted databases on the local server. However, the actual monitoring is performed by the Microsoft Exchange Replication Service that reports failure to the local Active Manager. It also monitors the Extensible Storage Engine (ESE) and other errors or failures.
How Active Manager Selects the Best Database Copy?
Active Manager determines which database copy to mount and the requisites to mount the database. It selects and activates the best passive database copy of the affected database when a failure occurs. In Exchange 2016 and later, this process is referred to as Best Copy and Server Selection (BCSS). Earlier, it was called Best Copy Selection (BCS).
1 - The process starts with Active Manager detecting a failure or improper and target-less switchover by the administrator.
2 - The PAM initiates the BCSS algorithm and starts the Attempt Copy Last Logs (ACLL) process to copy any missing log files from the server that had an active database copy before failover or switchover.
3 - When the ACLL process is complete, the AutoDatabaseMountDial compares the copy queue length of the database to be activated to ensure the following:
A. Missing log files are equal to or less than the value of AutoDatabaseMountDial.
B.?Missing log files are greater than the value of AutoDatabaseMountDial.
4 - If the value is equal to or less than AutoDatabaseMountDial (A), the PAM issues a mount request to the Information Store via Remote Procedure or RPC to mount the database.
A. If the value is greater (B), the Active Manager repeats steps 2 and 3.
B.?If the database does not mount, the PAM performs steps 2 and 3 to find the next best database copy, if available.
领英推荐
In addition to AutoDatabaseMountDial, the Active Manager analyzes the copies on the following criteria before activation:
Criteria 1: The database copies are selected and activated when they meet the following criteria.
Criteria 2: If the database copies don't meet the criteria mentioned above, it checks for the following criteria:
Criteria 3: If the database copies don't meet any of the criteria mentioned earlier, it checks for the following criteria:
Criteria 4: If the database copies don't meet the first three criteria, it checks for the following criteria:
Criteria 5: If the database copies don't meet any of the first four criteria, it checks for the following criteria:
Criteria 6: If the database copies don't meet the fifth criteria, it checks for the following criteria:
Criteria 7: If the database copies don't meet the first six criteria, it checks for the following criteria:
Criteria 8: In this criteria, Active Manager checks for the following:
Criteria 9: If the database copies don't meet the criteria mentioned above, it checks for the following criteria:
Criteria 10: If none of the database copies meet any of the nine criteria, the Active Manager tries to activate the database copy with the following status:
The PAM repeats the process to find and activate the best database copy if the database doesn't mount.
Conclusion
Although DAG protects against database, server, or mailbox level failure, the Active Manager can only set or activate the database copy if it meets the requirements and criteria discussed in this article. When none of the criteria matches, the Active Manager activates a database copy with either Healthy, DisconnectedAndHealthy, DisconnectedAndResynchronizing, or SeedingSource. Further, if none of the criteria matches, the Active Manager can't activate the database copy. Instead, the PAM will start the ACLL process again to find the next best copy. However, if there are no best copies available, it may fail. In such cases, you need to recover the database or the server. For this, you can use the EseUtil. You may also use an Exchange recovery software , such as Stellar Repair for Exchange, to quickly move the mailboxes from the failed server or database and export them to a healthy database copy on another or the same server, and restore client connectivity.