Solved

Setting a "Preferred" database copy in a DAG

Posted on 2013-05-21
3
1,088 Views
Last Modified: 2013-05-23
I currently have a Microsoft Exchange 2013 deployment which has two servers in two different sites. Both servers hold the Mailbox and Client-Access-Server roles.

The two servers are both members of a Database Availability Group, and they each hold copies of a single mailbox database, the only one used by the organization.

The two sites are linked by a site-to-site VPN, but the Internet connection at Site A is 3x as fast and housed in a better facility, so as a result, I normally have the "Server A" be the Active Member.

However, any time there's a connectivity issue or anything happens at Server A (e.g. install updates and reboot), there is a switchover to Server B. It never switches back. So I have to manually go in and activate the Site A database copy whenever anything happens.

Is there a way I can specify that Site A should always be the active member whenever  possible, so that it returns to being the active member after a switchover?
0
Comment
Question by:Frosty555
3 Comments
 
LVL 42

Expert Comment

by:Amit
ID: 39185602
Switch back require a manual intervention. As you need to first find the root cause why it is switched over, fix it and fail back. Because Exchange doesn't know, if you have power outage or WAN failure etc.
0
 
LVL 2

Accepted Solution

by:
DonYoung earned 500 total points
ID: 39185658
Set the activation preferences, and run the following command on a schedule...  I recommend once a night - assuming you patch at night...

cd "\Program Files\Microsoft\Exchange Server\V14\Scripts"
.\RedistributeActiveDatabases.ps1 -DagName DAG1 -BalanceDbsByActivationPreference

Open in new window

0
 
LVL 31

Author Comment

by:Frosty555
ID: 39192347
To set it up as a scheduled task, the actual syntax for the command was:

PowerShell -noninteractive .\RedistributeActiveDatabases.ps1 -DagName DAG1 -BalanceDbsByActivationPreference -Confirm:$False

Also, replace "DAG1" with the actual name of the DAG.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Utilizing an array to gracefully append to a list of EmailAddresses
A procedure for exporting installed hotfix details of remote computers using powershell
In this Micro Tutorial viewers will learn how they can get their files copied out from their unbootable system without need to use recovery services. As an example non-bootable Windows 2012R2 installation is used which has boot problems.
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now