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.
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
-
1
Cannot connect to the configuration database
-
1.1
Fix: Cannot connect to the configuration database SharePoint 2013 / 2016
- 1.1.1 Cannot connect to the configuration database: SQL Server Services is stopped
- 1.1.2 Cannot connect to the configuration database: Update Farm Account Credential Using PowerShell
- 1.1.3 Cannot connect to the configuration database: Network connectivity between SharePoint Server and Database Server
- 1.1.4 The SharePoint application pool account didn’t have a sufficient privilege to connect to the configuration database.
-
1.1
Fix: Cannot connect to the configuration database SharePoint 2013 / 2016
The “Cannot connect to the SharePoint configuration database” issue might occur because of
- The SQL Server Services was stopped.
- You have changed your farm account and you need to update its credentials.
- The account used to run the SharePoint application pool didn’t have a sufficient privilege to connect to the configuration database.
- 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.
Cannot connect to the configuration database: SQL Server Services is stopped
- Open SQL Server Configuration Manager.
- In SQL Server Services, check that SQL Server Instance is running and it’s agent.
- 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.
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
- On SQL server, Make sure that the TCP/IP has been enabled.
- 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
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.
You may also like to read SharePoint Configuration Wizard Failed to secure SharePoint Resources
- Open IIS > Application pool.
- Select the application pool for your web application > Advance Settings > Identity.
- Make sure that the application pool account (Identity) 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.
- ‘WSS_CONTENT_APPLICATION_POOLS‘ on SharePoint Config database.
- ‘WSS_CONTENT_APPLICATION_POOLS‘ on SharePoint_Admin.
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
- Checking the SQL Server Services Status.
- Updating the farm account credentials.
- Providing the account that used to run the SharePoint application pool the sufficient privilege to connect to the configuration database.
- Checking Network connectivity between the APP Server and SQL Server.
See Also
- SharePoint 2019: Cannot connect to database master at SQL server.
- SharePoint 2019: Service Accounts Recommendations.
- An error occurred in deployment step ‘Recycle IIS Application Pool’: The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm.
Have a Question?
If you have any related questions, please don’t hesitate to ask it at deBUG.to Community.
Pingback: Get SharePoint Config Database Server using PowerShell | SPGeeks