« Spinning Green Wheel When Opening Notes in Microsoft Dynamics CRM 4.0 | Main | “Report cannot be displayed” Error on CRM 4.0 Reports. »

July 10, 2008

Moving CRM 4.0 Databases (Including MSCRM_CONFIG) to a new SQL Server

Sometimes, you just have to move your databases. While the Microsoft Dynamics CRM 4.0 Implementation Guide has guidance on moving an organization's _MSCRM database, there is no mention to what to do if you want to move the MSCRM_Config database also. Luckily, Microsoft has published  Knowledge Base Article 952934 describing three possible scenarios:

  1. You want to move the Microsoft Dynamics CRM databases to another Microsoft SQL Server and Microsoft SQL Server Reporting Services server in the same domain. Additionally, you want to leave the Microsoft Dynamics CRM Server on the existing server.
  2. You want to redeploy the Microsoft Dynamics CRM deployment that includes the Microsoft Dynamics CRM server within the same domain or to another domain.
  3. You want to move the Microsoft Dynamics CRM Server or one of the Microsoft Dynamics CRM server roles. However, you want to leave the SQL Server and SQL Server Reporting Services server intact.

The scenario I'm more interested in is #1 - Moving just the databases to a new SQL Server. Here's how my experience went down.

Getting the Databases Moved

This part of the procedure is pretty simple. Just disable your organization(s) in the CRM Deployment Manager and then move the databases over to the new SQL instance. You could do this either by restoring from a backup, or using the detach/attach method - how to specifically do this is beyond the scope of this post.

Modify the Registry

On the CRM application server, you'll need to make some registry changes. What you'll be doing is modifying three entries in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM hive that reference the old SQL server to point to the new SQL server:

    1. configdb
    2. database
    3. metabase

You'll have to do this on every server that has the CRM App Server role.

Edit The Organization

Next, Open the Deployment Manager and disable the organization(s) that you just moved. Right-click the organization(s) and select Edit. You'll then have to type in the new SQL server name, click Next then Apply.

Finally

Once this is all complete, you'll want to do an iisreset on the CRM server. In my case, I then checked the Deployment Manager and expanded the Servers folder and found that the original SQL server was still listed instead of the new SQL server. I don't know if this is a bug or what, but it appears to be a pretty benign issue.

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e54fb34b6f883300e553b01b568834

Listed below are links to weblogs that reference Moving CRM 4.0 Databases (Including MSCRM_CONFIG) to a new SQL Server:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Great Post! You might find this information complementary to this post:

http://www.iccohio.com/blogs/mrichardson/archive/2008/07/17/changing-sql-server-name-for-dynamics-crm-4-0.aspx

Thank you,
Matt

...and expanded the Servers folder and found that the original SQL server...

The field Name in table Server in database MSCRM_CONFIG is not updated. You can update this manually, replace the old value with the new value of the new SQL-server. Run Deployment Manager and it will display the new SQL-server.

Cheers,

Frank

After doing this, the workflows have stopped working. We had IIS and SQL in the same machine. I used this guide to move the SQL databases to a new server.

Now CRM is working ok, but workflows are not. I think it has something to do with the roles defined in Deployment manager. Now the old server is IIS and the new server is SQL, but in the SERVER table, there is only one server record for the old server, and 'roles' field is set to all. I think a new record must be created, and roles defined, because right now, if I go to deplyment manager and click on enable server, I get error '"Enable Server" failed to complete.' I guess it's because now the server hasn't go all the roles.

Any ideas on how to sovle this??

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

CustomerEffective is a Microsoft Gold Certified Partner specializing in Customer Relationship Management (CRM) implementation, development and integration. We help organizations improve profitability through automation of sales, service and marketing processes.

Twitter Updates

    follow me on Twitter

    Search The Blog

    • Search the Blog
       

      WWW
      blog.customereffective.com
    Subscribe to this blog's feed

     Subscribe in a reader

    Add to Google Reader or Homepage

    Enter your email address:

    Delivered by FeedBurner