StartDagServerMaintenance.ps1 script fails in an Exchange Server 2010 environment

Applies to: Exchange Server 2010 EnterpriseExchange Server 2010 Standard

Symptoms


You try to configure a server that's in a database availability group (DAG) into maintenance mode by running the StartDagServerMaintenance.ps1 script. However, the script fails, and you receive the following error message:

VERBOSE: [Time UTC] Move-DagActiveCopy: Entering: `$MailboxServer=ExServer, `$Database=
VERBOSE: [Time UTC] Move-DagActiveCopy: Moving all replicated active databases off server ExServer
VERBOSE: [Time UTC] Move-DagActiveCopy: moving database ‘DBName’ off server ‘ExServer’
VERBOSE: [Time UTC] Move-DagMasterCopy: Entering: `$db=DBName, `$srcServer=ExServer, `$preferredTarget=
VERBOSE: [Time UTC] Test-DagTargetCopy: Testing move criteria for DatabaseName\ExchangeServer, with `$Lossless=True and
`$CICheck=False …
VERBOSE: [Time UTC] Test-DagTargetCopy: Name='DatabaseName\ExchangeServer', Status=’DisconnectedAndHealthy’,
CIStatus=’Healthy’, CopyQueueLength=0, ReplayQueueLength=0
VERBOSE: [Time UTC] Test-DagTargetCopy: Leaving (returning ‘False’)
VERBOSE: [Time UTC] Test-DagTargetCopy: Testing move criteria for DBName\DR-ExServer, with `$Lossless=True
and `$CICheck=False …
VERBOSE: [Time UTC] Test-DagTargetCopy: Name=’DBName\DR-ExServer’, Status=’DisconnectedAndHealthy’,
CIStatus=’Healthy’, CopyQueueLength=0, ReplayQueueLength=0
VERBOSE: [Time UTC] Test-DagTargetCopy: Leaving (returning ‘False’)
VERBOSE: [Time UTC] Move-DagMasterCopy: 0 copies out of 3 for database DBName will be attempted for move.
Log-Error : [Time UTC] Move-DagMasterCopy: Database ‘DBName’ *FAILED* to move! Now attempting to perform rollback to prevent a DB outage…

At D:\Program Files\Microsoft\Exchange\V14\scripts\DagCommonLibrary.ps1:483 char:14
+ Log-Error <<<< ($DagCommonLibrary_LocalizedStrings.res_0064 –f $db,”Move-DagMasterCopy”)
+ CategoryInfo : NotSpecified: ( : ) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Log-Error

Additionally, when you run the Get-MailboxDatabaseCopyStatus cmdlet on the database, the database does not report the DisconnectedAndHealthy status as expected.

Workaround


To work around this issue, use the following methods to manually fail over the databases from this server. 



Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.