Share via


Recovering the suspected SharePoint 2013 Config database

Issue:

Central Administrator site not accessible.


Errors

Exception description 1

This Operation can be performed only on a computer that is joined to a server farm by users who have permission in SQL server to read from the configuration database.

To connect this server to the server farm,use the SharePoint Products configuration wizard, located on the Start menu in Microsoft SharePoint 2010 products


Troubleshooting

SQL

Look at the SQL server whether it has the SharePoint 2010 config database.

Only SharePoint 2013 related content databases are found on SQL Server ,of course we can have only one version of the SharePoint on the same computer.

Services

Look into below locations to find the root cause of issue.

Check SharePoint related services on the server by going into services from the start up menu and found all services are running fine.

In IIS, scanned all the SharePoint related sites especially "Central Administration" and all app pools, all of them started,  except "SharePoint Web Services Root" site. I started this manually.

Database Health

Log into MS - SQL Management studio to check all databases are intact. Found that "SharePoint Config" database has been listed as "Suspected"

Why its suddenly in "Suspected" state despite all the capacity, SQL server installation related software and hardware requirements were met. ?


Root Causes

  1. Tried to update the farm credentials using "STSADM - o updatefarmcredentials" command, as system notification showed to update password for login (Administator).
  2. Tried 3 times by supplying the incorrect password with double quotes on the -userlogin and -password parameter.
  3. Immediately another blunder was a "Power Outage" and frequent low voltage supply.

Hardware Environment

SharePoint 2013 - configuration :

SQL Server 2008 R2 SP1

Windows Server 2008 R2 SP1

8GB RAM, 200 Gig hard disk.

Though 8GB RAM is not fair enough to run the SharePoint 2013 at least for development. But I am really happy to have this and continuously working on this more than one and half a year.


How to recover the SharePoint _Config data that listed out as "Suspected" by SQL Server.

Upon searching on SQL Server forums, found this life saver SQL Commands,

Follow the steps to "Recovering the Suspected SharePoint Config database "

First, detach the SQL server from the farm by running the "SharePoint Product Configuration"

and in the SQL Server- > New Query, run these command to repair the SharePoint config database.

1.EXEC sp_resetstatus SharePoint_Config;
2.ALTER DATABASE yourDBname SET EMERGENCY
3.DBCC checkdb('SharePoint_Config')
4.ALTER DATABASE SharePoint_Config SET SINGLE_USER WITH ROLLBACK IMMEDIATE
5.DBCC CheckDB ('SharePoint_Config', REPAIR_ALLOW_DATA_LOSS)
6.ALTER DATABASE SharePoint_Config SET MULTI_USER

And now the config database repaired and returns the warning and exception.

Again ran the "SharePoint Product Config Wizard" to attach config database (alternatively we can also say joining the farm).

You need to give the pass phrase while attaching the config database to SharePoint server,

Now configuration started 

 

When you get the http 500 Internal server error, look all services, app pools and IIS settings, all of them should be up and running.

But interesting thing was all SharePoint sites are opening  except "Central Administrator" site.

Run the STSADM updatefarmcredentials with due diligence and IIS reset.

Now you should be able to see the "Central Administrator"

Final notes on STSADM command usage on updating the farm credentials.

You cannot use the STSADM command if your SharePoint farm is down and moreover the STSADM will be used if you are able to log in as different account (Managed Accounts). But in my case as I am working on the local machine, always used the Administrator account that was experiencing the problem.

After all there is no option or parameter to update the farm credential using STSADM by supplying the old and new password as parameters.

Always use a account that has been registered as Managed account that enforce the "Password" changing policy on your farm.

So the changes you made to this account will be propagated to all your SharePoint servers in the farm.


References

To learn more on this topic, here is useful link

Reference Link