Sunday 14 July 2013

Microsoft Dynamics CRM 4.0 to 2011 Migration Pre-requisites. (MSDN Collection)




Before going for Microsoft CRM 4.0 to 2011 Migration. We have to do something in the registry level of both Application and SQL server to make the import process faster and error free.

(Below information gather from Microsoft).

Set the organization optimization when importing on the CRM server(s) 

1. On the Microsoft Dynamics CRM 4.0 Server, click Start, click Run, type regedit, and then click OK.
2. Locate the following registry subkey: HKEY_LOCAL_MACHINE\Software\Microsoft\MSCRM.
3. Under the MSCRM key add a new dword value called OptimizeOrgImport.
4. Right-click the new value, choose Modify, enter 1 and then click OK.
5. Again under the MSCRM key add a new dword value called OptimizeOrgImport_KeepUserMappings.
6. Right-click the new value, choose Modify, enter 1 and then click OK.
7. Close the registry editor.

Now you need to set the MaxUserPort and TCPTimedWaitDelay on both the CRM server(s) and the SQL server.

1. On the CRM server(s); click Start, click Run, type regedit, and then click OK.
2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
3. Right click Parameters, point to New, click DWORD Value, and then type MaxUserPort.
4. Right click MaxUserPort, click Modify, and then type 65534 for Value data, and set the radio button next toDecimal.
Note: This value controls the number of dynamic ports that are available. The valid range for this value is 5,000-65,534. Specifically, this parameter controls the maximum port number that is used when a program requests any available user port from the system.
5. Now, locate the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
6. Right click Parameters, point to New, click DWORD Value, and then type TCPTimedWaitDelay.
7. Right click TCPTimedWaitDelay, click Modify, type 30 for the Value data, and set the radio button next to Decimal.
Note: This parameter determines the length of time that a connection stays in the TIME_WAIT state when it is closed. When a connection is in the TIME_WAIT state, the socket pair cannot be re-used. This is also known as the "2MSL" state. Typically, this value is two times the maximum segment life time on the network.
8. Exit Registry Editor.
9. Restart the Microsoft Dynamics CRM server(s).
10. Go to the SQL server and perform steps 1- 8 on that server.
11. Restart the SQL server. 

Remove the unsupported stored procedure 

1. On the SQL server, open SQL Management Studio.
2. Locate the MSCRM database and expand it.
3. Expand Programmability and then expand Stored Procedures.
4. If there are any stored procedures you have added, please make a backup and delete them. 

Clean up the AsyncOperatioBase table of completed jobs 



Rebuild all indexes on the MSCRM database 

1. On the SQL server, Open SQL Management Studio.
2. Click the New Query button.
3. Change the database dropdown to MSCRM.
4. Paste the following into the new query editor window.
USE MSCRM
GO
EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)"
GO
5. Click the Execute button.
NOTE: This process will take some time to complete. Please let it finish before continuing.

Set MSCRM database recovery model to Simple

1. On the SQL server, open SQL Management Studio.
2. Locate the MSCRM database, right-click on it and choose Properties.
3. Click Options.
4. Change the Recovery Model to Simple and then click OK. 

Shrink the MSCRM database

1. On the SQL server, Open SQL Management Studio.
2. Locate the MSCRM database; right-click on it, point to Tasks, and then click on Backup. Backup the MSCRM database.
3. Now click on the New Query button. The query editor window will open.
4. Type the following into the query editor window.
DBCC shrinkdatabase (MSCRM, truncateonly);
5. Click the Execute button.
6. Once the shrink process has completed, backup the MSCRM database again.
7. Delete the MSCRM backup that you took from step 2.

Import the MSCRM 4.0 database into the CRM 2011 deployment 

1. On the CRM server, open the Deployment Manager.
2. Right-click Organizations and choose Import Organizations.
3. Select the SQL server and the MSCRM database and click Next.
4. Click Next at the display name and report server URL if they are correct.
5. At the next screen choose “Select Custom Mapping Options”.
6. Choose Manually map users and then click Next.
7. Locate an account that is a system administrator and map the user you are currently logged in with to this user.
8. Click Next.
9. Verify that the checks out correctly and then click next. If there are errors or warnings (ignore the db version warning) please let me know before continuing.
10. Finally import the  organization.
NOTE: The above steps are only for testing the import in a much faster way. Once the production db will be imported you will need to map all of the users.

Also you go through this post for more information.



No comments:

Post a Comment