Updated on 8142013 – I removed the NumThreadsForIndexCreation registry key as there was an update rollup that removed the significance of that registry key and your organization importupgrade will actually fail if you use this NumThreadsForIndexCreation now. We have this documented in KB 2714807.
Sean McNellis, Ryan Anderson and I recorded a podcast (https://aka.ms/tndfbt) last Friday on Dynamics CRM Upgrade Best Practices. During the podcast we mentioned that we would be posting a blog article outlining the topics that we covered with links to more details. That podcast and this blog post are by no means all encompassing upgrade best practices, but are just meant to cover some of the common topics and practices that we have been doing with our premier support customers.
Preparing for the Upgrade
- Reasons to upgrade to CRM 2011– We started out talking a little bit about this as your organization prepares for the upgrade to CRM 2011 there are lot of resources available online.
- Installation Media – Ensure that you have the CRM install media with Update Rollup 6 slipstreamed. The version should be 5.00.9690.1992 if you right click on SetupServer.exe and go to Properties | Details. I always use Greg Nichols post on our blog to get the updated download links. https://aka.ms/jwfeje
- This setup includes Update Rollup’s 1-6 as well all all the setup updates for Dynamics CRM 2011. This version is also required if you are planning to deploy to SQL 2012.
- CRM White Papers and other Technical Documents
- Recommended White Papers
- CRM 2011 Implementation Guide
- CRM 2011 Optimizations
- CRM 2011 SDK
- Deploying CRM 2011 from Development to Test and Production environments
- Complete list of white papers with links: https://aka.ms/aiiriw
- Recommended White Papers
- There are 3 types of upgrades – When upgrading you can choose between 3 different upgrade paths. The path you choose will vary depending on your current CRM infrastructure and your plans for your CRM 2011 production environment. We almost always recommend going with the Migration Upgrade approach as it provides the ability to test the upgrade multiple times, allows for performance benchmark testing and leaves your existing CRM 4.0 environment in tact in case a rollback is necessary. Most of our customers are using NLB and have an alias record setup in DNS which is pointing to the CRM 4.0 environment. The IP address on that alias in DNS is all that you would have to update once you decide to go live with your upgraded CRM 2011 environment in order for web and Outlook (Assuming you configured using the alias name which is also always recommended) to be pointed at CRM 2011.
- Upgrading from Microsoft Dynamics CRM 4.0: https://aka.ms/q3cybt
Server Optimizations – Prior to Upgrade
Registry keys on the CRM server that we recommend implementing for the CRM upgrade.
MaxUserPort - https://aka.ms/dims52
Leave in place
TCPTimedWaitDelay - https://aka.ms/xhts4r
Leave in place
OLEDBTimeout - https://aka.ms/yc14kw
Set back to previous value or delete key
*EnableRetrieveMultipleOptimization - https://aka.ms/bcii0b
Leave in place
|MaxDopForIndexCreation - https://aka.ms/kw0kzz||4||Delete|
|SortInTempDB - https://aka.ms/kw0kzz||1||Delete|
|NumThreadsForIndexCreation - https://aka.ms/kw0kzz||4||Delete|
|BatchAddAttributeUpdates - https://aka.ms/kw0kzz||1||Delete|
* We used to recommend setting the EnableRetrieveMultipleOptimization to 2 or 1 for most of our customers with millions of records in the PrincipalObjectAccess table, but now with the UR10 optimizations we are recommending that customers set this to 0 or delete the key as CRM dynamically sets this now based on your dataset.
- Enable AuthPersistNonNTLM
- After you set the authPersistNonNTLM property to True, you do not require a reauthentication for every request that is made over the same keep-alive connection. This will help to reduce the number of 401 requests that the CRM server receives and help reduce unnecessary traffic.
- Please refer to the following KB for complete details for checking and enabling this: http://support.microsoft.com/kb/954873
- Sean McNellis also wrote a blog post on Kerberos in Load Balanced Environments which also has details and screenshots on checking if this is enabled and commands to enable authPersistNonNTLM
- Remember to Set “UseAppPoolCredentials” in the webservers configuration file
- This is something that I have run into multiple times with our premier customers who are using NLB setups and running the CRM Application Pools as a domain user with Kernel Mode authentication enabled. You must do this extra step or your users will be prompted for credentials andor get a 401 error message when trying to access CRM.
- Sean details how to check for and set this up in IIS in his Kerberos blog post as well. https://aka.ms/hw3vzw
- Enable WCF Compression
- Enabling WCF Compression can greatly help to improve the CRM 2011 network performance in your environment. Especially when using the CRM 2011 Outlook client.
- Jeremy Morlock on our PFE team has written a great blog article on the benefits of WCF compression and also how to enable this in CRM 2011. https://aka.ms/may2aj
SQL Server Settings – Prior to Upgrade
- Run the SyncEntry clean up scripts- If your users are utilizing the CRM Outlook client to clean up old sync entry tables.
- Run the Async clean up script– The AsyncOperationBase table can grow to be very large and degrade performance overtime, so clean this up prior to upgrading.
- Change the database backup model to SIMPLE Recovery Model- After restoring the database backup on the new CRM 2011 SQL instance we recommend changing the recovery model to Simple. This will help reduce the amount of data logged to the SQL database transaction logs during the upgrade process and can help prevent issues with running out of drive space on the disk that the transaction logs are stored on.
- Reference the SQL Recovery Model MSDN page for details on changing this - https://aka.ms/skw22a
- SQL Max Degree of Parallelism
- You can use the max degree of parallelism option to limit the number of processors to use in parallel plan execution. In the past we have always recommending customers setting the Max Degree of Parallelism to 1 on the SQL instance that hosts the CRM databases. However, with the larger SQL servers that we are seeing with 8 or more cores we are starting to see better performance setting this to a 2 or a 4. There is no magic number here, but we have still always found that anything is better than leaving this at 0 for Dynamics CRM. We would recommend testing with 2 or 4 rather than 1 for CRM 2011 on SQL servers with 8 or more cores as that’s what we have typically been using with our premier customers. With the query optimizations that were done in UR10 and UR11 we recommend re-visiting this setting as you may get better performance leveraging parallelism even more now.
- SQL Server 2008 R2 Max Degree of Parallelism MSDN reference - https://aka.ms/luij0u
- Enable SQL CLR
- CRM 2011 has a MSCRMSqlClrLogin that is used for time zone conversions when you run dashboards, charts and advanced finds. When the Microsoft SQL Server is enabled to use common language runtime (CLR), it can show a significant improvement in performance for those features.
- Here is the MSDN link with steps to enable this - https://aka.ms/x0rert
- Update statistics with Full Scan– We recommend doing this prior to and after the upgrade to CRM 2011
- Here is the command you can use in SQL Management Studio: Exec sp_MSForEachTable 'Update Statistics ? with FULLSCAN'
Post Upgrade Optimizations
- Change the database backup model back to FULL Recovery Model– Remember to change the database recovery model back to FULL after the upgrade has completed.
- Reference the SQL Recovery Model MSDN page for details on changing this - https://aka.ms/skw22a
- Install Update Rollup 10 on the CRM Servers, SRS Data Connector, E-mail Router and Outlook Clients
- Installing the latest Update Rollup is always recommended from Microsoft, but Update Rollup 10 in particular offers a lot of enhancements and optimizations. Specifically around Quick Finds and searches involving the PrincipalObjectAccess table and the use of the EnableRetrieveMultipleOptimization registry key.
- Update Rollup 10 blog and podcast with download links - https://aka.ms/dtkco3
- Note Update Rollup 10 was re-released on 10412, so please ensure you have the latest V2 build installed. We have a blog post detailing this as well - https://aka.ms/behme3
- SQL Server
- Setup a custom SQL job to re-index all CRM out of the box and custom indexes. CRM will re-index all of this out of the box indexes by default, but we have found that our customers are better off disabling that feature as it also shrinks the CRM database and that can take a very long time and lead to possible downtime when your database is several hundreds of GB’s or larger. We will be posting a blog article on our recommendations for this process soon and I will update this post with a direct link.
- Run the CRM 2011 Maintenance Job Editor - http://crmjobeditor.codeplex.com/
- Download and run this tool to update the CRM 2011 Maintenance jobs, so that these run during off hours. If you do not set these CRM will run them based off of when you installed CRM and that could be during business hours in many cases since the server was not in production while you were setting this up.
Jobs to update:
|Set this to run during off hours|
|Index Management||Set this to run during off hours.|
|Re-Index All||Set this to run during off hours.
- Set this to run in 2050,for example, so it essentially disables the job
- You would want to setup a separate SQL job to maintain indexes outside of CRM as I mentioned above
|Clean up Workflows||Set this to run during off hours|
|Create Audit Partition||Set this to run during off hours|
|Check for MUI Updates||Set this to run during off hours|
|Refresh Sharing Counts||Set this to run during off hours|
|Refresh Entity Row Counts||Set this to run during off hours|
CRM Outlook Clients
We ran out of time on this podcast to spend much time talking about upgrading the CRM Outlook clients, so we are planning to do a follow up podcast on that topic specifically. However, we do want to provide you with a few quick best practices for upgrading CRM Outlook clients
- Use SCCM or other management tools to push the CRM Outlook client upgrade. Most of our customers use SCCM or other management tools to install and upgrade their CRM Outlook clients.
- Install CRM 2011 Outlook client using SCCM - https://aka.ms/mv4hru
- Install CRM using command prompt and config XML files - https://aka.ms/fhh305
- I wrote a blog post awhile back that I have used several times with my customers when building SCCM packages to deploy the client which details how to install CRM without an Internet connection. Ideally you would push the pre-reqs ahead of time, but if that is not an option you can follow this blog and build them into your installer package too. - https://aka.ms/bnzpx0
- User Sync Filters, Settings, etc. are all maintained in the database and will be upgraded.
- CRM 4.0 Outlook Client can communicate with a CRM 2011 Server! This is a huge benefit for organizations where they cannot upgrade all the CRM Outlook clients over a single weekend. CRM 4.0 Outlook clients will continue to work with an upgraded CRM 2011 server. The only exceptions are that some new features like Connections, the Reading Pane and other settings will not be available in the ribbon or toolbar because those are CRM 2011 specific features. Also, if you are using the CRM 4.0 Outlook client with offline access you will not able to go offline when configured to a CRM 2011 server until you upgrade to the CRM 2011 Outlook client.
Some Lessons Learned
We could write an entire book on this and probably should some day, but for the purposes of this blog supporting our podcast we wanted to highlight a few areas.
- Operations Manual – Take the time to document and build an operations manual for CRM, so that you can track how to build servers, which registry keys or other settings were setup, etc., so that when you add another server later or move to a new deployment you are not running into issues that you prevented or resolved in the past.
- Ensure you have enough free space on your SQL disk that hosts your transaction log file. During the upgrade your transaction log will grow and we have seen this grow as much as twice the size your SQL data file, so make sure to allocate enough free space for the transaction log to grow during the upgrade. We recommend allocating at least 2 to 3 times the size of your SQL data file for your transaction log during the upgrade. Changing the backup model to Simple (as detailed above) will really help here as well. The bottom line is to make sure you test this prior to upgrade and don’t let this be the reason why your upgrade fails on Friday night.
- Supportability – CRM 2011 provides much more functionality and extensibility than CRM 4.0 did, so re-visit any unsupported stored procs, triggers, etc. that you have in place and look into whether or not you even need that workaround in place anymore, or if there are ways to do that with plug-ins or other supported methods in CRM 2011. This will only help you in the long run and keep you out of unwanted trouble.
- Smart Matching - This is how CRM correlates e-mail and sets the regarding values on e-mails automatically in CRM 4.0 and CRM 2011. We had some customers in CRM 4.0 that wanted to disable this feature and it was possible through a registry key detailed in this KB - http://support.microsoft.com/kb/958084. In CRM 2011 we added the ability to configure and disable Smart Matching to the UI. Because of this change we had to enable Smart Matching by default for all installs and upgrades. So, if you had Smart Matching disabled in CRM 4.0 and want it to be disabled in CRM 2011 as well, you will need to go disable this in the UI.
- Steps to disable in CRM 2011 – Settings | Administration | System Settings | E-mail | Un-check “Use Smart Matching” in the ‘Configure e-mail correlation’ section and click OK. You will want to make sure that you are using Tracking Tokens then as well.
- Configure CRM Deployment Manger for Network Load Balancing (NLB). Almost all of our customers are using NLB in their CRM deployments and one of the steps that is sometimes forgotten is to setup NLB correctly after installing the additional CRM servers. By default the first CRM server you installed will be listed in Deployment Manager, so you will not be leveraging NLB correctly until this is configured properly.
- This MSDN page details the steps - https://aka.ms/kodk1u
Well, this blog post got a lot longer than I had anticipated, but I wanted to provide you with supporting details and URL’s to all of the topics that we covered during our podcast. I hope that you enjoyed listening to our podcast, or even just consuming the information in this blog post. Hopefully this will help your CRM 2011 upgrades go smoothly.
Please let us know if you have any questions regarding this podcast andor blog, or if you are interested in learning more about Microsoft Premier Support and the services we deliver to our Premier Support customers.
Sean McNellis, Ryan Anderson & Shawn Dieken