Switchover active server in Exchange 2010 DAG fails

Just tried a switchover of active databases from one mailbox server in a DAG to another, and out of 22 databases – 20 went over to the other server just fine. The last 2 failed with this error:

——————————————————–
Microsoft Exchange Error
——————————————————–
A switchover of server ‘Mailboxserver1.fqdn’ cannot be performed.

Mailboxserver1
Failed
Error:
An Active Manager operation failed. Error: The database action failed. Error: An error occurred while trying to validate the specified database copy for possible activation. Error: Database copy ‘DB1’ on server ‘Mailboxserver2.fqdn’ has content index catalog files in the following state: ‘Failed’.. [Database: DB1, Server: Mailboxserver2.fqdn]

An Active Manager operation failed. Error: An error occurred while trying to validate the specified database copy for possible activation. Error: Database copy ‘DB1’ on server ‘Mailboxserver2.fqdn’ has content index catalog files in the following state: ‘Failed’..
Error:
An Active Manager operation failed. Error: The database action failed. Error: An error occurred while trying to validate the specified database copy for possible activation. Error: Database copy ‘DB2’ on server ‘Mailboxserver2.fqdn’ has content index catalog files in the following state: ‘Failed’.. [Database: DB2, Server: Mailboxserver2.fqdn]

An Active Manager operation failed. Error: An error occurred while trying to validate the specified database copy for possible activation. Error: Database copy ‘DB2’ on server ‘Mailboxserver2.fqdn’ has content index catalog files in the following state: ‘Failed’.

The quick resolution to the issue was to Suspend the Passive copy of these mailbox databases on Mailboxserver2, and resume the databasecopy shortly after. Then it was possible to activate the databasecopy on Mailboxserver2. But still on 1 of the databases the Content index was failed.

To resolve this, just run:

Get-MailboxDatabaseCopyStatus | where {$_.contentindexstate -eq ‘Failed’} | Update-MailboxDatabaseCopy -CatalogOnly

This would also fix the issue in the first place, before you move over the active databases.

Thanks to Paul for his always great posts and inspiration.
http://exchangeserverpro.com/cannot-activate-database-copy-content-index-catalog-files-in-failed-state