Exchange 2010: Redistributing Database copies in DAG

Below are the steps to performed

To make the above procedure  easier and automated regarding moving, activation (un)blocking database, additional scripts are available since SP1 for Exchange 2010.

These scripts are located in the Scripts folder, below the Exchange installation folder. By default the location of the scripts will be C:\Program Files\Microsoft\Exchange Server\v14\Scripts.

 Going into Scripts folder directly run the below command

 Cd $exscripts it will directly locate to scripts folder

http://www.techrid.com/wp-content/uploads/2015/04/Redistributing1-300x15.png

 

Utilizing them, the procedure is quite easy as you can see below. Note that the example uses a DAG named DAG1 with nodes EX01 and EX02 as members. They both host 11 databases, EX01-DB01 and EX02-DB02; both host 1 active copy and a passive copy of the other database.

 

1: Login to DAG Member EX01

2: Run StartDagServerMaintenance.ps1 targeting that DAG member,

e.g.:   .\StartDagServerMaintenance.ps1 –server ex01

 

http://www.techrid.com/wp-content/uploads/2015/04/Redistributing2-300x44.png

 

3: Perform maintenance;

4: Run StopDagServerMaintenance.ps1 targeting that DAG member

 e.g.:.\StopDagServerMaintenance.ps1 –server ex01

http://www.techrid.com/wp-content/uploads/2015/04/Redistributing3-300x43.png

 

5: Optionally run RedistributeActiveDatabases.ps1 for the DAG,

e.g.:

.\RedistributeActiveDatabases.ps1 –DagName EXDAG01 –BalanceDBsByActivationPreference –Confirm:$false

 

http://www.techrid.com/wp-content/uploads/2015/04/Redistributing4-300x162.png

 

http://www.techrid.com/wp-content/uploads/2015/04/Redistributing5-300x171.png

Note: when upgrading on major levels (SP1 to SP2, SP2 to SP3), you can’t move a database to a lower level host. This means that when upgrading a node from SP2 to SP3 and moving a database to that SP3 node in the process, you can’t move that database to any SP2 nodes in the DAG. Keep this in mind when planning your upgrade, because it will impact the availability level by limiting your fallback options.