Upgrade CRM2015 to CRM2016 : Timeout error during the upgrade
When I tried to uprade an organization from CRM2015 to CRM2016 I hade a Time out error : “The timeout period elapsed prior to completion of the operation or the server is not responding. The wait operation timed out“.
I checked on google and I read that “You cannot import your CRM 2015 database to upgrade to CRM 2016 if it has a Full Text Catalogue. Something that is likely if you have been using the improved searching functions of CRM 2015.”
To fix this problem, we have two possibilities: First one is to disable the Full-search for Quick find on CRM2105 before to migrate. But I don’t know but You need to wait a full 24 hours from the time you change this setting before you attempt to import (or backup to import) the organization into a CRM 2016 environment.
if you need to resolve problem in fast way there is the second solution: This one is an update script directly on databse but it is not supported. The steps are the following:
- Restore backup from CRM 2015 database
- On the SQL manager, select the Database in question, and select “New Query” (our 2015 dates restore is demo_2016_MSCRM)
- In the new Query window. Paste the following code and click Execute
declare @catid int select @catid=fulltext_catalog_id from sys.fulltext_catalogs where name='CRMFullTextCatalog' declare c cursor for select sys.tables.name, sys.fulltext_indexes.unique_index_id from sys.fulltext_indexes inner join sys.tables on sys.fulltext_indexes.object_id = sys.tables.object_id where sys.fulltext_indexes.fulltext_catalog_id=@catid open c declare @TableName varchar(200), @UniqueID as integer fetch next from c into @TableName, @UniqueID while @@fetch_status = 0 begin declare d cursor for select sys.indexes.name, sys.tables.object_id from sys.tables inner join sys.indexes on sys.tables.object_id = sys.indexes.object_id where sys.tables.name=@TableName and sys.indexes.index_id = @UniqueID open d declare @KeyIndex varchar(200), @object_id as integer fetch next from d into @KeyIndex, @object_id if @@FETCH_STATUS <> 0 begin Print 'Error with' + @TableName end while @@fetch_status = 0 begin BEGIN TRY Print 'CREATE FULLTEXT INDEX ON [dbo].'+@TableName+' KEY INDEX ['+@KeyIndex+'] on([CRMFullTextCatalog]) WITH (CHANGE_TRACKING AUTO)' Print 'GO' declare e cursor for select sys.columns.name from sys.columns inner join sys.fulltext_index_columns on sys.columns.object_id=sys.fulltext_index_columns.object_id and sys.columns.column_id=sys.fulltext_index_columns.column_id where sys.columns.object_id=@object_id open e declare @ColumnName varchar(200) fetch next from e into @ColumnName while @@fetch_status = 0 begin Print 'ALTER FULLTEXT INDEX ON [dbo].'+@TableName+' Add ('+@ColumnName+')' Print 'GO' fetch next from e into @ColumnName end close e deallocate e END TRY BEGIN CATCH print 'Error' + @KeyIndex END CATCH fetch next from d into @KeyIndex, @object_id end close d deallocate d fetch next from c into @TableName, @UniqueID end close c deallocate c
The complete script is on my Github: DisableFullTextSearch-Catalog.sql
- When the query executes successfully. Copy to the Clipboard all of the “Message” output in the bottom half of the screen to your clipboard.
- Now Expand the “Storage / Full Text Catalogues” section of the Database in question and select Properties.
- Select Table / Views. Using the the little Left pointing arrow.
Click it as many times as needed to move all the items on the right to the left. Like this:
- Once finished, select he Script Dropdown and select “Script Action to New Window” (or just click on OK both actions should work)
- Now Close all the Management for the SQL Server. This is Important.
- Upgrade your CRM database the normal way using the Microsoft Dynamics Deployment Manager / Organisations / Import Organisation
- Once the upgrade has finished and you have your database imported and upgraded to CRM 2016, Open the SQL manager for the database in question again, and run a new query against the database as we did in step 3 above.This time however we are going to paste the output we captured to clipboard in step 4 above, and run that output as a script.
- Click Execute again. And you should be rebuilding the database indexes to a state that will function with the new CRM upgraded database.
Source are :
- community.dynamics.com/crm/f/117/t/184508
- interactivewebs.com/blog/index.php/crm/crm-2016-import-upgrade-from-crm-2015-failure-timeout-expired/
Archiviato in:Microsoft Dynamics Crm Tagged: CRM2016, Database, Dialog, Microsoft Dynamics CRM, Migration, Sql Server

This was originally posted here.
*This post is locked for comments