Exchange 2013 - Microsoft Exchange Replication Service restarting
Scenario: Exchange 2013 multiple databases. Replication service starts and stops constantly after reboot.
After a reboot to a non-response Exchange 2013 Server, when running the Get-MailboxDatabaseCopyStatus command was run, all DBs showed with a Service Down status. After a few seconds, the status changed to initializing and then back to Service Down.
https://collaborationpro.com/wp-content/uploads/2015/09/Exchange_Replication-300x28.png
The following events were logged:
Event ID 106 and 4138. It was reporting about 1 database that couldn't mount.
https://collaborationpro.com/wp-content/uploads/2015/09/Exchange_Replication1-300x108.png
Next, navigate to Applications and Services Logs -> Microsoft -> Exchange -> MailboxDatabaseFailureItems -> Operational.
Here it will give you the name of the DB that cannot replay logs. The next step is to suspend that database.
You can do so by running the following command:
- Suspend-MailboxDatabaseCopy -Identity "DBName"
After a few seconds, all the databases should mount and that one will show as "failed and suspended".
You can now update the database copy. In this case, it was easier to use the -DeleteExistingFiles switch:
- Update-MailboxDatabaseCopy -Identity "DBName" -DeleteExistingFiles
Depending on the DB size this can take a while but all should be healthy after this.