Friday 27 May 2011

Dynamics CRM 4.0 for Outlook – A SQL Error occurred

This is an error I am sure many organisations that have deployed Microsoft Dynamics CRM 4.0 for Outlook will have seen.  Typically, this happens when a user selects “Track in CRM” in Outlook and that email is quite large or contains attachments.  




A SQL Server error occurred. Try this action again. If the problem continues check the Microsoft Dynamics CRM Community for solutions or contact your organization's Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support.

To begin resolving this issue I went straight to the CRM 4.0 Diagnostics Tool and ran a Trace from the Microsoft Dynamics CRM Server.  Once I had replicated the error, I Found the following error message in the trace file.




>CrmSoapExtension detected CrmException:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

I found the resolution to this issue in KB 918609 and the steps I carried out were as follows

(Steps take from http://support.microsoft.com/kb/918609 at 24/05/2011 10:39)

1.       Click Start, click Run, type regedit, and then click OK.
2.       Locate the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM


3.       Right-click MSCRM, point to New, and then click DWORD Value to create a new DWORD value.
4.       Rename the DWORD value to the following value:
OLEDBTimeout
5.       Right-click the DWORD value, and then click Modify.
6.       In the Edit DWORD Value dialog box, type 86400 in the Value data box, click Decimal in the Base option, and then click OK.


Note According to the requirement of the computer that is running SQL server and the number of customization files, the value can be larger than 86400. The value of 86400 is equivalent to 24 hours.
7.       Right-click MSCRM, point to New, and then click DWORD Value to create a new DWORD value.
8.       Rename the DWORD value to the following value:
ExtendedTimeout
9.       Right-click the DWORD value, and then click Modify.
10.   In the Edit DWORD Value dialog box, type 1000000 in the Value data box, and then click OK.

                        

Notes
o    In the Value data box, you can type a value that is larger than 1,000,000. However, do not type a value that is larger than 2,147,483,647. This is hexadecimal 0x7FFFFFFF.
o    If this key already exists, notice the current value. After you have completed the import or the upgrade for Microsoft Dynamics CRM, set the value of this key back to the original value or delete the key if it did not previously exist. The default OLEDB timeout value is 30 seconds.


No comments:

Post a Comment