Saturday, January 18, 2014

Steps to resolve “Can't connect the configuration database” or "Configuration database in suspect mode" error in sharepoint

If your SQL Server ever crashes or hard rebooted then you may come across corrupted SharePoint_Config database. Recently while doing a SharePoint 2010 development on my VM, I had to hard reboot my personal VM, and I had received dreaded cannot connect to the configuration database error while accessing my content web application.
Having seen this error many times before, I have tried all the usual suspects –http://support.microsoft.com/kb/823287 – IIS Web Site availability, IIS Application Pool Availability. IIS Application Pool Identity, and SQL Server availability. After carefully walking through all the diagnostic steps, I had noticed that “SharePoint_Config” database was in suspect mode.
I had never seen SQL Server database in suspect mode. Quick Google took me following links to fix this issue.
As it turned out, it’s not a SharePoint issue. Any SQL Server databases can be corrupted and gets in the suspect mode. Following steps would fix the suspect database mode issues. I am adding these steps on my blog for reference only. Real credit goes to above blogs. To fix SQL Server database suspect mode, we need to use the SQL Server’s emergency mode which allows you repair the database by reparing to last normal state.
After running following script on the Master database, SharePoint_Config database suspect mode was fixed and I was able to access the content web application.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- Use the Master database
Use Master
-- Verify that database has issues
EXEC sp_resetstatus 'SharePoint_Config'
-- Put the database in emergency mode
ALTER DATABASE SharePoint_Config SET EMERGENCY
DBCC checkdb('SharePoint_Config')
-- Set the database in single user mode
ALTER DATABASE SharePoint_Config SET SINGLE_USER WITH ROLLBACK IMMEDIATE
-- Repair the database with data loss
DBCC CheckDB ('SharePoint_Config', REPAIR_ALLOW_DATA_LOSS)
-- Set the database in multi-user mode
ALTER DATABASE SharePoint_Config SET MULTI_USER
-- Verify that database is reset
EXEC sp_resetstatus 'SharePoint_Config'
References:

Steps to resolve “Can't connect the configuration database" Error in SharePoint

SharePoint_Config Database Suspect Mode – Cannot Connect to the Configuration Database Error

No comments:

Post a Comment

Image noise comparison methods

 1. using reference image technique     - peak_signal_noise_ratio (PSNR)     - SSI 2. non-reference image technique     - BRISQUE python pac...