onsdag 4 juli 2012

Upgrading Dynamics CRM 4 to CRM 2011 challenges

Upgrading software can always be a challenge.Running into unexpected problems with what you thought was supported can make things even worse.


I have recently been working with a Dynamics CRM upgrade from 4.0 to 2011. The CRM is, by my standards, a quite large implementation with clustered front ends and an organization database that is 19GB as a backup file. The project at hand is an in-place upgrade that has a test environment that is a rather good replica of the production environment, that by itself is not always the case.

The CRM was set up with an organization database that had a dash in the name. This had obviously been accepted at install so I didn't think much about it when I did the upgrade of the test environment. Being a large database I imagined the upgrade would take some time so I scheduled it to run over night. The next morning I had a system that was partially upgraded. The front-end server that I did the upgrade on was upgraded and was now a 2011 server. The config database was upgraded and was also of 2011 standard. The organization database however had not been upgraded and was halted with a somewhat strange error message. It said that it could not find the database XX_YY_MSCRM. That was something that was understandable since the database name was XX-YY_MSCRM.
I started looking for solutions on this which did not include changing the database name which it would seem, was the only option I could find.  I would like to thank the users of Microsoft's CRM forum for helping me with this.

The solution to this problem was the following
1. Restore the Config database
2. Create a new organization in the Deployment manager
3. Disable the organization I wanted to rename.
4. Delete the organization, this will only remove it from the Config-database
5. In SQL Server Management Studio, rename the database. This step can be a bit tricky if there are connections to the database. I dropped the database an reconected it
6. Import the organization with Deployment Manager.

After these steps I was able to upgrade the system, having restored the front end server as well. The thing that struck me with this in place upgrade was that it only took a bit over one hour to complete while a migration upgrade of a CRM 4.0 organization haven't taken under 2 hours yet. We also upgraded a copy of this organization with the migration upgrade path to create a development platform and that upgrade took more than 4 hours to complete.

When I had succeeded in upgrading this CRM I was a bit curious about whether dashes were allowed in the organization name or not. Reading the implementation guide for CRM 4.0, it clearly states that the organization name can only contain letters, numbers and underscores. This made me wonder how the database organization name was allowed to contain the dash. The installation or import guid in Deployment Manager really should have stoped this from happening. I wonder why it didn't. The next thing I thought about was the error message where it looks as if the program interpreted the dash as an underscore which seems strange. Lastly I wonder why the installation program doesn't check the organization database prior to upgrading the system. What I was "stuck" with was an upgraded server with a config database and organization database that were incompatible. I might have been able to do an import of the CRM 4.0 database if I had renamed it but since I wanted to test the upgrade path of the production server I chose to restore everything.


Rickard Norström
Developer at CRM-Konsulterna
www.crmkonsulterna.se

tisdag 3 juli 2012

It begins...

So this is my blog where I will gather my experience working with Microsoft Dynamics CRM.

I have been working with this product the past two years and have found myself in various situations where other blogs have helped me.

Hopefully I will have the same impact on others some day where my problems, and hopefully solutions to these problems, will help some other person having similar or the same problem solve them quicker.


Rickard Norström
Developer at CRM-Konsulterna
www.crmkonsulterna.se