Recently my SharePoint sites and Central Administration site became not accessible. After some inspection I found that they cannot access SharePoint Config database. When I checked SharePoint_Config database by SQL Management Studio I saw that SharePoint_Config database is marked as Suspect. That is the first time that I saw a database has been listed as Suspect.
After doing some research I found the technet article below.
https://social.technet.microsoft.com/wiki/contents/articles/32422.recovering-the-suspected-sharepoint-2013-config-database.aspx
As suggested I run the following sql commands one after another.
- EXEC sp_resetstatus SharePoint_Config;
- ALTER DATABASE yourDBname SET EMERGENCY
- DBCC checkdb(‘SharePoint_Config’)
- ALTER DATABASE SharePoint_Config SET SINGLE_USER WITH ROLLBACK IMMEDIATE
- DBCC CheckDB (‘SharePoint_Config’, REPAIR_ALLOW_DATA_LOSS)
- ALTER DATABASE SharePoint_Config SET MULTI_USER
Unfortunately these steps didn’t solve my problem. After finding the main causes of this problem can be hardware failure or corrupted files, I tried to check disks of the SQL server. Although SQL server is on a virtual machine, somehow it’s disk has been corrupted and check disk process successfully repaired these errors. After that the above sql commands successfully recoved SharePoint_Config database.
So don’t forget to check the disks before trying SQL repair steps.