DAG - Mount Exchange databases according to ActivationPreference does not work.

Checior200 0 Reputation points
2025-10-24T11:35:27.5+00:00

Good Morning!
I am looking for help with DAG management. It is new configuration described below:
-2xWindows Server 2025,
-2xExchange SE RTM vesion: 15.02.2562.017 - i know it is not newest SU
-1xWitnessServer
-IP_Less DAG

When I turning on maintanance mode on each server, databases mount in 2nd stable server. But when I turn off maintanance mode, database with ActivationPreference 1 do not back on "main server" for this database.
I checked: PreferenceMoveFrequency and it is default set to: 01:00:00. I need to add that I used ps1 script provided by MSFT Exchange Team to balance databases, but as far as I know, it should perform automatically each 1h.

Perhabs you have heard about similar case, please let me know!
Regards,

Exchange | Exchange Server | Management
Exchange | Exchange Server | Management
The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hin-V 7,295 Reputation points Microsoft External Staff Moderator
    2025-10-24T13:36:14.4+00:00

    Hi @Checior200

    Thank you for posting your question in Microsoft Q&A. 

    We understand that your Exchange Server databases are not automatically returning to their primary server (ActivationPreference 1) after exiting maintenance mode.  From your description, it appears that after exiting maintenance mode (using StopDagServerMaintenance.ps1), the databases remain active on the secondary server instead of moving back to the primary server as per their ActivationPreference settings, despite the PreferenceMoveFrequency being set to the default 1-hour interval (01:00:00). This behavior suggests that the automatic rebalancing mechanism may not be triggering as expected. 

    As my research this could be caused by: 

    Rebalance Timing The automatic rebalance process runs on an hourly schedule. If maintenance mode was exited recently, the system may not have reached the next rebalance window yet. 

    Server Health Evaluation Active Manager may not consider the primary server healthy enough to host active database copies. This can prevent rebalancing even if the server appears operational. 

    Replication Service Refresh The Microsoft Exchange Replication service may require a restart to properly apply the rebalancing logic. Without this refresh, the system might not initiate the expected moves. 

    DAG Configuration Issues Misconfigurations or transient quorum issues, especially in IP-less DAG setups using Datacenter Activation Coordination (DAC) mode, can interfere with rebalancing operations and Active Manager decisions. 

    Could you try to follow these steps to address this issue:  

    Verify DAG Configuration 

    Run:

    Get-DatabaseAvailabilityGroup | FL Name, PreferenceMoveFrequency, DatacenterActivationMode 
    

    Ensure PreferenceMoveFrequency is set to 01:00:00 and DatacenterActivationMode is DagOnly. If not, update with this command: 

    Set-DatabaseAvailabilityGroup -Identity "YourDAGName" -PreferenceMoveFrequency 01:00:00 
    

    Check your Server Health: 

    Run:

    Get-ServerHealth -Identity "MainServerName" | FL ServerRole, HealthSet, AlertMask 
    

    Run this on all DAG members. AlertMask should be 0 (healthy). If issues still persists, you could use this: 

    Set-ServerComponentState -Identity "MainServerName" -Component ServerWideOffline -State Active -Requester Maintenance 
    

    Inspect Database Copy Status

    Get-MailboxDatabaseCopyStatus -Identity "YourDBName" | FL Status, ActivationPreferenceRank, ActiveOnServer 
    

    Confirm the database is Mounted, check the active server, and look for replication lag or issues. 

    Review Event Logs 

    Open Event Viewer and navigate to: Applications and Services Logs -> Microsoft -> Exchange -> High Availability -> Operational 

    Look for:  

    Event ID 11322: Rebalance attempts.

    Event ID 5000: Active Manager decisions.

    Additionally, could you try to verify Activation Preference configuration. To ensure databases are correctly prioritized for activation, review the current activation preference settings:

    Get-MailboxDatabase "DB1" | Format-Table Server, DatabaseCopies, ActivationPreference 
    

    Confirm that the primary server is assigned ActivationPreference 1.

    If the order is incorrect, you can update it using:

    Set-MailboxDatabaseCopy -Identity "DB1\Your Primary Server" -ActivationPreference 1 
    

    Please understand that our initial reply may not always immediately resolve the issue. However, with your help and more detailed information, we can work together to find a solution.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.