CRM 2011 – an error occurred while connecting to the MSCRM_CONFIG database

I got this error today when suddenly and for no reason I could work out their CRM 2011 stopped working (this has happened twice in one week with two different customers).

I have blogged about this error before and if you have got this error then check out the blog below

This time it was the same except the previous solution wasn’t working, although I thought it should

When I was trying to diagnose the problem, I noticed the MSCRM_CONFIG database wasn’t attched but  also it wasn’t detached.

I also noticed there was another database created with a guid type name, when I opened the database I noticed it was basically a copy of the MSCRM_CONFIG database (in terms of tables).

I’m not sure how this happened but it looked like some kind of backup or transaction had caused a copy of the MSCRM_CONFIG database.  I looked at the physical files of the guid database and it had the physical name of MSCRM_CONFIG.mdf.

I think maybe the server lost power and when the server came back up the guid database opened it locked the MSCRM_CONFIG.mdf file so when the real MSCRM_CONFIG database tried to lock it couldn’t.

CRM cannot function if the MSCRM_CONFIG database is down because this is basically a systems setting type database with information for all the organisations on the server.

To resolve the problem I had to unattach the guid database and then attach the MSCRM_CONFIG database and it came up and everything was working again.

here is a screenshot of the dodgy guid database

2 thoughts on “CRM 2011 – an error occurred while connecting to the MSCRM_CONFIG database

  1. Eni Elezi February 1, 2012 / 1:12 pm

    Nice to know! Thx


  2. Lance Wurz August 15, 2012 / 8:43 pm

    Another thing to try… check DNS of the SQL server – was setting this up in Azure and sure enough, the DNS setting on my SQL server was blank.


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 )

Google+ photo

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

Connecting to %s