DAG DB’s flipping all the time randomly for no apparent reason

I have run into this issue several times in my travels and want people to be aware of this problem. In a DAG (Database Availability Group), if your databases are randomly mounting or flipping from one server to another, including across datacenters, you may be allowing your Network Interface Card (NIC) to go to sleep. And that’s not a good thing.

Power Management on the NIC:

Within the Windows Server Operating System power management setting on the NIC, make sure it is turned off! Why is this important? I’ve now had three different customers run into this issue of having the power management settings turned on. One of them only had it turned on for their replication network! Oddly enough there databases were randomly flipping from one DAG node to another for no apparent reason. And yes, they were all on physical machines. This setting seems to appear ‘on’ more often in virtual machines, but can clearly happen on any server setup. So here are the steps to look at:

You can use Device Manager to change the power management settings for a network adapter. To disable all Power Management settings (How to KB) in Device Manager, expand Network Adapters, right-click the adapter, click Properties, click the Power Management tab, and then clear the Allow the computer to turn off this device to save power check box.

Warning: some of your Network Adapters may not have the ‘Power Management’ tab available. This is a good thing, as your NIC is not able to go to sleep. This means there is one less item to worry about in your setup.

In addition, now that PowerShell is able to be used for just about everything, there is this page that has a PS script available to make this change. And with PS, don’t forget that you can use this script to blast down these changes to all Exchange servers with a single step. So be careful, since PS can be extremely powerful.

So there you have it, if your DAG Databases are randomly mounting from one server to another, you may have a sleepy NIC. Please confirm that you have avoided this setting as you build out your Exchange DAG environment. Thank you.

Mike