How to fix “Cannot connect to the configuration database.”


When I browse to a SharePoint site, I got the Server Error in ‘/’ Application, Cannot connect to the configuration database.

The Analysis:

There are many reasons why:

  • You applied a Hotfix or Service Pack to your SQL Server and have not restarted the SQL Server.
  • The SQL database may not be running.
  • The account that is used by application pool does not have the required permissions to the SQL Server database.
  • Network connectivity has been lost between the SharePoint Server and the Microsoft SQL Server server.

There are different ways to check all possibilities. Few of them are as below:

1) Verify that the SQL database is running and services.

2) Firewall can block access and communication with your Microsoft SQL Server Server.

3) User Permissions.


I tried all the options. I observed into event viewer that my servers Timer service is getting crashed after few seconds. I found it might caused by the fact that the Configuration Cache directory (C:\ProgramData\Microsoft\SharePoint\Config) did not contain a folder with the farm GUID as the name.

While trying to resolve the above error, I came across the entry of dsn in the registry at the same location  HKLM > SOFTWARE > Microsoft > Shared Tools > Web Server Extensions > 14.0 > Secure > ConfigDB 

The connection was made using IP address which means that while running the product configuration wizard of SharePoint, the server farm installation was selected and the IP address was chosen instead of computer name MYCOMPUTERNAME for the database connection.

Somehow, IP address was removed and re-added the IP address, restarted all services (sql server, IIS Admin & Sharepoint). All the web applications are working fine.

Hope this will help someone!!!





  1. Thanks, that key was also incorrect on my server. Once I corrected it, SharePoint came back to life! Whew! Thanks a million.

  2. You’re so interesting! I don’t believe I’ve truly read
    anything like that before. So wonderful to find somebody with some
    original thoughts on this subject matter. Really..
    thank you for starting this up. This site is one thing that’s needed on the internet,
    someone with a bit of originality!

  3. I do not even know how I stopped up here, however I believed this put up
    was once great. I don’t recognise who you’re however
    definitely you are going to a famous blogger if
    you are not already. Cheers!

  4. I’ve learn some excellent stuff here. Definitely value bookmarking for revisiting.
    I wonder how a lot effort you set to make such a magnificent informative website.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s