Preparing for CRM 2011: How to Make your Microsoft Dynamics CRM 2011 Upgrade Faster
We have had a number of clients upgrade from Microsoft CRM 4.0 to Microsoft Dynamics CRM 2011, and I have found that there are several steps that you can take prior to upgrading your environment that will make the process go faster.
1. Clear out the asynchronous table. We have previously posted many posts on proper care and feeding of the AsyncOperationBase table, which can grow vary large if you have heavy usage of workflows.
When you upgrade your environment, the upgrade process deletes out any legacy asynchronous system jobs. If the table is very large, this can slow down the upgrade. I recommend clearing out the completed jobs prior to upgrade.
2. Run the deletion service. In CRM 4.0, if you deleted records, the records were not immediately deleted—they were flagged for deletion, then the CRM deletion service came along, usually within 24 hours, and deleted the records.
One problem that can happen, especially if large numbers of records were bulk deleted, is that records can get stuck in the “soft delete” state.
In 2011, there is no more soft deletion of records—they are deleted immediately from the database when the records are deleted in CRM. When you upgrade, the upgrade process will hard delete any leftover “soft deleted” records. If you have many deleted records in your system, this step can take a while.
Before you upgrade, you may want to search your main entity tables to identify if you have a large number of soft deleted records still sitting in your database. For example, the following query will identify any deleted records that still exist in the account tables:
select * from accountbase where deletionstatecode = 2
If you find that there are high volumes of deleted records still residing in the database, you can clean them up with a free tool such as Mitch Milam's "Run CRM Deletion Service" utility.
3. Remove any unsupported database elements. If you have added any custom indexes, triggers, or tables directly to the MSCRM database (rather than through supported methods), you should delete these items prior to your upgrade. If you don’t, there is a chance that your upgrade will fail, and if it does, you will sometimes get an error that may not be intuitive.
All of the upgrades I’ve done have been successful, but this has been the area that has caused the most headaches. You will get an error that says something like “Cannot insert duplicate key in object 'dbo.#ActualColumns'” with no real explanation about what the issue is.
To avoid these headaches, if you have any non-supported database components, remove them prior to upgrade. After upgrading, you can restore them if you have to, or redesign them in a more supported way.