Home > Best Practices, SharePoint 2010 > How to fix “Cannot connect to the configuration database.”

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

Problem:

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.

Solution:

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 10.10.10.1 which means that while running the product configuration wizard of SharePoint, the server farm installation was selected and the IP address 10.10.10.1 was chosen instead of computer name MYCOMPUTERNAME for the database connection.

Somehow, IP address 10.10.10.1 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!!!

 

 

 

Advertisements
  1. Eliya Amanoeel
    January 24, 2014 at 9:58 am

    Thanks!

  2. August 31, 2014 at 8:01 pm

    Thanks!

  3. April 22, 2015 at 12:08 pm

    Thanks!

  4. March 5, 2016 at 12:21 am

    There is no C:\program data folder

  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s

%d bloggers like this: