Cannot connect to the configuration database SharePoint 2016

Cannot connect to the configuration database SharePoint

In this post, we’re gonna fix “Cannot connect to the configuration database” in SharePoint Server.

SharePoint Central Administration: Cannot connect to the configuration database.

Cannot connect to the configuration database SharePoint

Applied To

  • SharePoint 2016.
  • SharePoint 2013.
  • SharePoint 2010.

You might also like to read Cannot connect to database master at SQL server. The database might not exist, or the current user does not have permission to connect


Cannot connect to the configuration database

The “Cannot connect to the SharePoint configuration database” issue might occur because of

  1. The SQL Server Services was stopped.
  2. You have changed your farm account and you need to update its credentials.
  3. The account used to run the SharePoint application pool didn’t have a sufficient privilege to connect to the configuration database.
  4. Network connectivity issue with SQL Server.

You might also like to read This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database.


Fix: Cannot connect to the configuration database SharePoint 2013 / 2016

Cannot connect to the configuration database: SQL Server Services is stopped

  • Open SQL Server Configuration Manager.
SQL Server Configuration manager
  • In SQL Server Services, check that SQL Server Instance is running and it’s agent.
Cannot connect to the configuration database In SharePoint
  • If it was stopped, try to restart it.
  • If it was unable to start,
    • Right click on service.
    • Select properties > Reset the account credentials > Click start.
Reset SQL Server Account

For more details check Unable to start SQL Server service.


Cannot connect to the configuration database: Update Farm Account Credential Using PowerShell

If you have recently changed the Farm account or password, you may get “Cannot connect to the SharePoint configuration database”. if you didn’t update the Farm credential using PowerShell.

stsadm -o updatefarmcredentials -userlogin domain\username -password

Cannot connect to the configuration database: Network connectivity between SharePoint Server and Database Server

  • On SQL server, Make sure that the TCP/IP has been enabled.
SQL Server Netowrk Configuration - TCP IP
  • On the Application Server, Try to telnet to the database server IP & port (In case, it’s highly available, try to use the Virtual IP ).

For more details check Enable the telnet client feature on Windows Server.

  • Also, you can use UDL file to check connectivity between App server and SQL Server instance
Data Link Properties.png

For more details check How to Check SQL Server Instance Connectivity from the application server to database server for a specific user.

  • Make sure that the firewall didn’t block the SQL Server Port (default port is 1433)

Check this steps with your system and network administrators, or disable the firewall state in case, it’s dev environment.

firewall properties for SharePoint

You may also like to read SharePoint Configuration Wizard Failed to secure SharePoint Resources


The SharePoint application pool account didn’t have a sufficient privilege to connect to the configuration database.

  • Open IIS > Application pool.
  • Select the application pool for your web application > Advance Settings > Identity.
Change the identity Application pool in IIS
  • Make sure that the application pool account (Identity) is a member of WSS_WPG.
the application pool account is a member of WSS_WPG
  • Make sure that the application pool account (Identity) has a sufficient privilege on the following database.
    • db-owner‘ and ‘SP_DATA_ACCESS’ on all web application Content Databases.
Configuration database permissions for SharePoint Application Pool
  • WSS_CONTENT_APPLICATION_POOLS‘ on SharePoint Config database.
  • WSS_CONTENT_APPLICATION_POOLS‘ on SharePoint_Admin.
content database permissions for SharePoint Application Pool

You might also like to read SQL Server Best Practices for SharePoint 2019


Conclusion

In conclusion, we have solved “Cannot connect to the configuration database SharePoint 2016” by

  1. Checking the SQL Server Services Status.
  2. Updating the farm account credentials.
  3. Providing the account that used to run the SharePoint application pool the sufficient privilege to connect to the configuration database.
  4. Checking Network connectivity between the APP Server and SQL Server.
See Also
Have a Question?

If you have any related questions, please don’t hesitate to ask it at deBUG.to Community.

1 thought on “Cannot connect to the configuration database SharePoint 2016”

  1. Pingback: Get SharePoint Config Database Server using PowerShell | SPGeeks

Leave a Reply