Repair Unhealthy DAG DB indexes health & Script for monitor


Detected unhealthy index state after adding a new server to the DAG or either problem occurs after a restart or failover;

1. The first step is to get your script ready for checking daily replications with your dag and detect this problem easy; This is the script code that you will need to generate the report, follow Paul’s guide in order to do so

Get-DAGHealth.ps1 – Database Availability Group Health Check Script

2. You can check also manually here clicking on properties of the database replica;

will tell you the index state and the status ( in or case its Crawling )

2019-04-08 11_39_58-2019-04-08 11_39_24-mRemoteNG - confCons.xml - CWUMAILSRV1.cwuhq.local.png - Gre.png

3. Getting hands on the issue

So we have detected unhealthy indexes what now?

2019-04-08 11_42_02-Inbox - - Outlook (Logging Enabled).png

The first step is to reseed the catalog using the following command :

Get-MailboxDatabaseCopyStatus * | where {$_.ContentIndexState -eq "Failed"} | Update-MailboxDatabaseCopy -CatalogOnly

2019-04-08 11_46_09-2019-04-08 11_45_35-Spiceworks - Knowledge Base.png - Greenshot image editor.png

Now this should sort your issue for now; If it does not :

Restart the server and repeat from point 1 ;
Make sure any active databases are moved to the other servers
Make sure the server is not assigned to Public Folders and if yes, public folders failover needs to be done
The index will appear in “Crawling state”



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.