Important notice

Please note that this blog is discontinued here. All the posts are also coppied to my new blog at http://boris.gomiunik.net.
Important: Due to large amount of comment spam further commenting has been disabled here. If you wish to send me a comment, plase look up the same post on my new blog and leave comment there. Thanks!

5/04/2007

"Cannot connect to the configuration database" and SharePoint

Today I've received another of the cases when SharePoint (v2) couldn't connect to the configuration database. This can be a common problem but it's not so horrible to solve it.

The reason for this is that SharePoint lost the connection to the database.

Reasons may be the following:

  • SQL or WMSDE database may not be running

  • IIS may be running in IIS 5.0 isolation mode
  • The account for connecting to SQL or WMSDE might be gone or with changed password
  • update - SQL Server Embedded Edition might not be running (check services) - Thanks, deanoc (see the comments)

The solution to these is on the following link:

http://support.microsoft.com/kb/823287/en-us

But I've found another reason that could be. Simple: The SQL is running, credentials are also ok and IIS isn't in the 5.0 isolation mode. The problem may occur if sharepoint simply can't find the database. Reasons for this may be many: the database has moved, dns has changed, ... In my case was the later. By changing the DNS server in the network we've had to add one more record manually to point to the correct one and the sites started to work.

14 comments:

Anonymous said...

Hi, I've just found another reason why WSS 3.0 "Cannot connect to the configuration database":

If WSS installs SQL Server Embedded Edition and uses that to host the config DB, make sure that the SQL Server 2005 Embedded Edition Service is running.

We found that the service was set to Manual startup, and after a server reboot WSS failed.

Boris Gomiunik said...

Thanks for the info, deanoc. I've updated my post. :)

Anonymous said...

I have a MOSS2007 app server that works well w/ SQL2000. But after the server is running for several hours, it starts to show the "Cannot connect to the configuration database" i checked the w3wp.exe seemed to have doubled in size 320,000kb and it happens once every end of business day. Would the search crawl cause such a problem?

adari said...

Hi, In my situation,
all the following conditions are working fine.
->SQL or WMSDE database is running
->IIS 6.0 is running
->The account for connecting to SQL or WMSDE have not been changed.
->updated - SQL Server Embedded Edition & running

Still i am getting the same error 'Connot connect to the configuration database'. what should i do ???
my configuration is:
WSS 3.0
SQLExpress 2005

plz give a reply
thanks
Surya prakash adari,

Boris Gomiunik said...

Hi, adari. Sorry for late reply. If all is working, try also the following:

1. Check in IIS if application pool used for sharepoint central admin is running
2. If you don't have the SQL Server 2005 Express management studio, download it and check if you have the configuraiton database in the sharepoint.
3. Did you perhaps change the NETBIOS ( Domain name of the server? This might also be the reason.

Anonymous said...

Hi, I have this problem. I installed MOSS and WSS 3.0 on my machine, First when I open central admin site, it opens fine and I created webapplication and SSP and everything. Then after some time if I open the central admin, I get the message "Cannot connect to the configuration database.". The possible reason that I can see in the SQL management studio I can't see Sharepoint_Config database connected. So what I can do to solve this? Any help would be more than appreciated.

Anonymous said...

Hi all,
we have the same problem. We checked everything according to MS (http://support.microsoft.com/kb/823287), but nothing changed. In our case it turned out to be FILE PERMISSIONS problem. Eventually in the morning one of the guys installed windows server security patch. It seems that this patch changed file permissions for config DB file to Administrator only.

Anonymous said...

I dont know if this will help anyone but I had issues similiar to this and nothing seemed to work. I checked the application Pool - properties- Identity and sure enough that was it. It was set to predefined network service but it actually needed to set to configurable and the user name /password that it was originally set up with. Very strange but this worked for me.

Anonymous said...

"I dont know if this will help anyone but I had issues similiar to this and nothing seemed to work. I checked the application Pool - properties- Identity and sure enough that was it. It was set to predefined network service but it actually needed to set to configurable and the user name /password that it was originally set up with. Very strange but this worked for me."

This also worked for me, thank you very much :)

Unknown said...
This comment has been removed by the author.
Unknown said...

Hi there,

I have just changed the computer name and added it to a new domain. Can't find anywhere how to change settings to connect to a new database server (which is located on the same server though). Could anybody help? Logs say: Leaving function SqlSession.ExecuteNonQuery
10/15/2008 11:54:24 1 INF Did not find version 60b1f2be-5130-45ab-af1d-edd34e626b5d in database AWDPRO01\OfficeServers, server WSS_Search_PROJECTTEST
10/15/2008 11:54:24 1 INF Entering function SqlServerHelper.SqlServerHelper
10/15/2008 11:54:24 1 INF Entering function SqlServerHelper.Initialize
10/15/2008 11:54:24 1 INF Entering function SqlServerHelper.ParseSqlServerInstance
10/15/2008 11:54:24 1 INF Leaving function SqlServerHelper.ParseSqlServerInstance

Thanks!
Peter

Anonymous said...

As a previous poster said, what worked for me is this:

1. Open Server Manager.
2. Click on Roles.
3. Choose Web Server (IIS)
4. Choole IIS.
5. Open server in the Connections panel.
6. Choose Application Pools.
7. For every item in Application Pools, click on it once, and then choose Advanced Settings.
8. Under Process Model, Identity,
change it, choose "Custom Account".
9. Enter an account and password for an account with a lot of permissions. I used the Sysadmin.
10. Restart the Web Server. Then it worked.

Anonymous said...

Hi

I am having the same problem and you have mentioned below -
"In my case was the later. By changing the DNS server in the network we've had to add one more record manually to point to the correct one and the sites started to work."

Please let me know where you manually added and what you addeed.

Thank.

pixxie said...

I had a huge problem with this after I deleted two sites one was an FBA site and then proceeded to recreate them The issue was permission based for my DBUser login, I had to remove the user from both the FBA and the content site then delete the user after I re-added the user and it worked fine. My suggestion is to check the application error log