Monday, January 6, 2014

SQL Timeouts when Importing CRM 4.0 Customisations

Another unhelpful aspect of importing CRM 4.0 customisations is that a SQL timout can occur when importing or creating a new entity. I believe (from checking the SQL Server Profiler when this is happening) is that CRM triggers re-creation of indexes in CRM using the

exec p_RecreateIndexes

stored procedure.

On large systems this can exceed the default timeout, or even a custom timeout if you've added one. I got around this issue by running the stored procedure manually before importing the customisations to minimise the amount of re-indexing that took place.

You can also increase the timeout in CRM:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM\OLEDBTimeout

This value does not exist by default, and if it does not exist then the default value will be 30 seconds. To change it, add the registry value (of type DWORD), and put in the value you want (measured in seconds). Then you have to recycle the CrmAppPool application pool for the change to take effect

https://community.dynamics.com/product/crm/crmtechnical/b/crmdavidjennaway/archive/2008/09/04/sql-timeouts-in-crm-generic-sql-error.aspx

No comments:

Post a Comment