Repair Config/Content Database

Published by Mohit Agrawal on

On an average day when you think everything is running fine suddenly you found out that your SharePoint site is not working and it is giving 404 error, even the Central Administration website failed to open.

You checked all application pools and services and found out everything is started. Did IIS reset and rebooted the machine but the issue did not resolve.
I faced the same issue with my SharePoint farm. Here is some experience which will help you to make things working again

Resolution:

Open SQL Server and check the config database(In other scenarios this error can be in content databases as well).
You will see that your config database is in Emergency mode or Suspended mode. This can be caused by unplanned machine shutdown.
For bringing the datbase back to healthy state, we will have to repair config/content database. Below sql queries will help in doing so:

alter database [db_name] set emergency

dbcc checkdb(db_name)

Alter database [db_name] set single_user with rollback immediate

dbcc checkdb([db_name],repair_allow_data_loss)

Alter database [db_name] set multi_user

and the datbase is back to healthy state.

 2,330 total views,  1 views today

Care to Share?

Mohit Agrawal

Experience in SharePoint developement, migration.

0 Comments

Leave a Reply