How to Recover SharePoint 2013 Databases from Suspect mode

By | August 29, 2014

sharepointMicrosoft SharePoint is the powerful program that are created to meet the multifaceted and the collaborative requirement of business.  It is very common for the business to face corruption or inaccessibility issue in it. Sometime we find an error message that are unknown to us.  Just take a practical scenario you have restarted your SharePoint server, and opened the Central Administration and encountered the below error message:

Server Error in ‘/’ Application Runtime Error Description: An application error occurred on the server.

01-SharePoint-2013-Server-Error-in-Application-500x66

To resolve this issue you can check few things:

  • Make sure that your SQL Server services are running
  • Ensure that your IIS application pools are started
  • Review the Windows logs and collect some information regarding the server. You may get they following event:

The SQL Database ‘SharePoint_Config’ on SQL Server instance ‘C4968397007′ not found. The error details are given below.

Cannot open database “SharePoint_Config” requested by the login. The login failed. Login failed for user ‘DC07\SQLSvc’.

 02.1-Windows-logs-500x117

This action indicated that something is wrong with my SQL Server. You tried to open SQL Server management studio and found that some of the SharePoint databases are missing and set to the suspect mode.

02-SharePoint-2013-databases-are-in-Suspect-mode

Now what is suspect mode in SQL Server database?

The reason behind the suspect modes are many such as hardware failure, inaccessible or corrupted database etc.

No need to worry! You can resolve the situation.

A quick guide that will help you to recover the SharePoint database from suspect mode?

First open your SQL Server management studio and then execute the following query one after another:

  • Run the given query. sp_resetstatus command will then turn off the suspected flag on your database.

EXEC sp_resetstatus ‘SharePoint_Config’;

Once you have executed the following query you will find the given warning. No need to worry it doesn’t mean that you did something wrong.

04-SQL-Server-reset-status-of-database-warning

  • The next step is to set your database to an Emergency mode. You can perform this action by executing the following query:

ALTER DATABASE SharePoint_Config SET EMERGENCY

As soon as you have executed the above query you will find your database like this:

 emergency-mode

Once you have set your database to an Emergency mode then it will become the read only database.

  • Now just execute the following query in order to check logical and physical integrity of the objects in your database.

DBCC checkdb(‘SharePoint_Config’)

  •  In order to complete the process run the following queries:

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 DBCC CheckDB (‘SharePoint_Config’)

09-Everything-is-back-to-trackNow just repeat the action for each one of the affected databases.You will find everything on track but if you don’t find everything working properly then you can use third party repair tool to get the database in inaccessible form.

SharePoint Repair Tool is the professional repair tool that can repair and recover your corrupt, damaged or inaccessible file in a new healthy form. So now no need to worry if you don’t have the proper back-up of your database because this repair tool is capable or retrieving the inaccessible database files. So download this repair tool and resolve any sort of corruption issue.

downloadnow buynow learn-more-button-orange

How to Recover SharePoint 2013 Databases

  1. Firstly launch the SharePoint Recovery Tool you would find an interface. This interface screen displays two options to recover SharePoint data: ‘Complete Repair’ and ‘Document Recovery’ Select as per your requirement.userguide-1
  2. If you choose ‘Complete Repair’, the screen will show the options for selecting and searching SQL Server (.MDF) files. Click on ‘Select File’ to select a SharePoint database for repair. If you do not know the actual path of the database which you want to repair, click on the ‘Search File’ to locate the MDF file in a specific drive. After selecting the desired file initiate the scanning processuserguide-2
  3. After finishing the scan, the software would generate a tree of all SharePoint database tables and will display it in the left pane. You can select the table in the tree and can have the entire preview in the right pane. Then Click on ‘Repair’ to begin repairing for the selected database.userguide-3
  4. After clicking on ‘Repair’, this dialog box will appear. Specify the SQL Server name or Instance name and the desired destination path. Click on the ‘Browse’ option to choose the destination path. And select ‘OK’ button.userguide-4
  5. Once this process gets completed, you would find a dialog box that displays this message ‘Recovered file saved at the desired location. This shows that Recovery Process has successfully completed’. And select ‘OK’ button.userguide-5
  6. You would find another dialog box that asks whether you want to attach the repaired database to the web application. If you click on ‘Yes’ button, the above dialog box will be displayed. In the web application URL type, the name of the corrupt database and SQL Server Instance name. Then Select ‘OK’ button and proceed. When the process gets finished, you would be able to access the repaired database by opening the web application.userguide-6