SBX - Search With Button

SBX - Forum Post Title

In-place upgrade from 2015 on-prem to 2016 on-prem

Microsoft Dynamics CRM Forum

Allison Walters asked a question on 11 Dec 2015 3:23 PM
My Badges

Question Status

Verified

I'm trying to upgrade a 2015 on-prem installation to 2016.  I'm using the same admin account to install as when I installed originally, same service accounts specified, etc...

When I get to the "System Checks" page, it checks off Operating System and Server User Input, and then moves onto CRM Database, where it just sits and does not progress.  When I look in the logs, I can see it going through the Database check section, and the final lines are:

---------------------
13:24:09|Warning| Check SqlDefaultValueConstraintValidator : Warning: The default value constraints in the Microsoft Dynamics CRM database are not consistent with Microsoft Dynamics CRM default value constraints.
13:24:09|Verbose| Connecting to database Data Source=DBSVR01\DYNMSCRM;Initial Catalog=CAWST_MSCRM;Integrated Security=SSPI.

---------------------

And this is where it's just sitting.  Server isn't crashed, no non-responding processes....just, nothing's happening.  (Note: there are a few other db checks that happen before this, and it gets past those just fine.)

So I tried just upgrading the server without upgrading the org, and that worked fine.  Then in the Deployment Manager I try just upgrading the org, and it hangs again.  The crmdmsnapin log shows the exact same final lines as above before it just stops proceeding.

This org was created in CRM 2015, so not some old version that's been updated over and over, or anything like that.  And we haven't touched the DB directly or done anything out of the ordinary with the organization or its config.

Any ideas as to what I can try next, or where else to look?  Out of curiosity, has anyone done this successfully yet?

Reply
Kyle responded on 11 Dec 2015 3:37 PM
My Badges

Allison,

1st, where'd you get the 2016 download? :)

Do you have a stack trace in the log, near your error?

Reply
Allison Walters responded on 11 Dec 2015 3:44 PM
My Badges

It's on both MSDN and the Volume Licensing Centre.

There's no additional information in the log, no - in fact, there's no error.  That line it's stopping on is just a verbose info line, and there's no pop up on the screen, no nothing.  Just looks like it's still working, but it's been a long time with no motion.

Reply
Allison Walters responded on 11 Dec 2015 4:25 PM
My Badges

Okay, finally after exactly an hour, it errored out with the message:

15:16:27|  Error| Check SqlFullTextIndexValidator : Failure: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

The wait operation timed out

I checked the SQL server and the FullText service for this db was running, but it was set to Manual for some reason.  I set to automatic, and restarted it just to try *something*. However, it seems to be waiting at the same place.  Can't believe the hour long timeout period...that's kinda nuts.

Reply
Milind P responded on 11 Dec 2015 4:50 PM
My Badges

How big is the organization database?

Reply
Allison Walters responded on 11 Dec 2015 4:53 PM
My Badges

Only around 500MB.  This is just a test one, so not lots in it.  We could recreate it, but that doesn't do us much good for our other server...

Reply
Matthias Baumhauer responded on 12 Dec 2015 9:03 AM
My Badges

We are experiencing the same issue with our 2015.1 database (3 GByte).

Reply
Nicolas Cirnigliaro responded on 12 Dec 2015 7:32 PM

We recently finished the upgrade to 2016 from an organization created in CRM2015. First we had some problems to update, so i uninstalled the report and crm apps. Did a restart and started the installation. Then we had some troubles with the recognition of the SQL server but was just some permissions issues. Once we finished to install CRM, we did a restart. It wasn't necessary to import the solution because was recognized for the Organization Manager, so we just upgraded the organization. It took 2 hours to finish the process, and that's all. Our organization have around 19000 contacts and +9000 organizations so i think it's small, the server is virtual. Did you tried to uninstall all the software in relation with Dynamics on the server?

Reply
Allison Walters responded on 14 Dec 2015 10:49 AM
My Badges

I tried skipping the organization update and just updating CRM itself, and that worked fine, so uninstalling and reinstalling the CRM software I don't think would do a thing in this case.  You're having different errors than we did, though, so it seems like your issue was something different than ours.

Reply
Matthias Baumhauer responded on 14 Dec 2015 10:55 AM
My Badges

I can confirm that skipping the organization update is possible for me as well and the installation completes fine then.

However, a later organization update also fails in my case with the same symptoms:

The system check gets stuck on "CRM organization" and timeouts after exactly one hour. During that time, there is a constantly high CPU load on the SQL server process and I am not sure if this indicates a privilege related issue.

I have no other 3rd party products or major customizations in place.

Reply
Allison Walters responded on 14 Dec 2015 10:58 AM
My Badges

If you check the logs (c:\Users\<installing user>\AppData\Roaming\Microsoft\MSCRM\Logs), can you tell if it's timing out in exactly the same place?

Reply
Matthias Baumhauer responded on 14 Dec 2015 11:20 AM
My Badges

I will restore the VM state and report back to you.

I am sure that we also observed the following warning for our instance:

Warning| Check SqlDefaultValueConstraintValidator : Warning: The default value constraints in the Microsoft Dynamics CRM database are not consistent with Microsoft Dynamics CRM default value constraints.

Reply
MehrCrm responded on 14 Dec 2015 12:32 PM
My Badges

We were experiencing a similar issue. Here are the steps we took. I hope this helps.

On SQL Server

1) Set the database Recovery mode to Simple:

Expand the Server > Expand Databases > Right click on the MSCRM Organization databases and go to properties. In the Properties window, select Options and change “Recovery Model” to simple.

2) Remove Completed Asyncs Jobs. Please refer to the following articles:

https://support.microsoft.com/en-us/kb/968520

www.avtex.com/.../database-bloat-asyncoperation-system-job-maintenance-and-dynamics-crm-online

3) Rebuild all indexes using the following script:

basitaalishan.com/.../rebuild-all-indexes-on-all-tables-in-the-sql-server-database

ON CRM Server

1) Increase the timeout for import: If the OLEDBTimeout registry setting doesn't exist, it should be added and set to a value of 86400 prior to upgrading.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM

Right-click MSCRM, point to New, and then click DWORD Value to create a new DWORD value.

Rename the DWORD value to the following value:

OLEDBTimeout

Reply
Milind P responded on 14 Dec 2015 5:02 PM
My Badges

Completed on-prem in-place upgrade to MS CRM 2016 from MS CRM 2015 (update 0.2)

I have used organization database of size 10GB haven't  faced any issue while upgrade...

used a single server i.e. CRM server and SQL database on the same server, it took around 2 Hours to upgrade it.

before staring the installation for MS CRM 2016 i did

1. uninstall MS CRM 2015 reporting extension from server

2. Added the registry key OLEDBTimeout under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM"   with value 86400

3. Added the registry key ExtendedTimeout under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM with value 1000000

Reply
Hus I responded on 15 Dec 2015 1:25 PM

Im having the exact same issue. Anyone else experiencing this behaviour?

This seems like a similar issue social.microsoft.com/.../solved-crm-2015-to-2016-upgrade-error-sql. But I only have 1 organisation, so I dont think the solution applies in this case.

Reply
Allison Walters responded on 15 Dec 2015 1:35 PM
My Badges

Hussain - did you try the solution above with setting the timeouts?  I haven't had a chance to try it yet myself, but if people are saying the upgrade is taking 2 hours, I guess it makes sense that the one hour timeout isn't enough and that upping it would solve the issue.  It seems insane that that's necessary, but...looks like it may work.

Reply
Steffen Risser responded on 16 Dec 2015 8:07 PM
My Badges
Verified Answer

Having the same problem, I discovered the following TSQL using the SQL Activity Monitor:

while (@@FETCH_STATUS <> -1)

begin

if (@TableName = 'DocumentIndex')

begin

   set @columnCount = @columnCount + 1     

   if( @FullTextColumnName COLLATE Latin1_General_CI_AI not in ('Title', 'KeyWords', 'SearchText'))

   begin

  set @modifiedFTIndex = 1

   end

   fetch next from @mycursor into @TableOwner, @TableId, @TableName, @FullTextColumnName, @FullTextColID, @FullTextBlobColumnName, @FullTextBlobColumnId, @FullTextLanguage

end

 

if (@TableName = 'BusinessDataLocalizedLabelBase')

begin

   set @businesDataLocalizedLabelColumnCount = @businesDataLocalizedLabelColumnCount + 1     

   if( @FullTextColumnName  COLLATE Latin1_General_CI_AI not in ('Label'))

   begin

  set @modifiedBusinessDataTableFTIndex = 1

   end

   fetch next from @mycursor into @TableOwner, @TableId, @TableName, @FullTextColumnName, @FullTextColID, @FullTextBlobColumnName, @FullTextBlobColumnId, @FullTextLanguage

end

end

To get the TSQL statement, I used the following query, where 65 is the session I found using the activity monitor

 

SELECT sqltext.TEXT

FROM sys.dm_exec_requests req

CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext  where req.session_id = 65

 

For me the statement would never complete, because my CRMFulltextCatalog also contains other columns. It looks like the problem is the “fetch next from @mycursor …” which won’t be called for columns other than 'DocumentIndex' or 'BusinessDataLocalizedLabelBase'. So this is where the endless loop is coming from.

Therefore I removed all other columns from my CRMFulltextCatalog except 'DocumentIndex' and 'BusinessDataLocalizedLabelBase'.

 

Finally the system checks went through and I was able to perform the upgrade!

 

Reply
Edward Ainsworth responded on 20 Dec 2015 8:38 AM
My Badges
Verified Answer

Thank you everyone in this thread for pointing me in the right direction.  Not sure if this will help anyone else, but I wrote a little script to regenerate the CRMFullTextCatalog.  I ran this script before upgrading, then manually removed all tables/views from the Catalog.  After the upgrade was complete, I ran the output generated by this script, which re-populates all the tables/view back into the CRMFullTextCatalog, putting it into the pre-upgrade state (keep in mind that the index must rebuild after running the script).  I make no guarantees this will work in your environment, but it appears to have worked properly for our test migration.

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

Reply
Matthias Baumhauer responded on 21 Dec 2015 11:00 AM
My Badges
Verified Answer

Edward,

Thanks for all the effort.

I basically got everything working now. I removed all columns prior to upgrade, upgraded. Then, the full text search was broken. I just disabled it, rebooted, and enabled it again in the general system settings.

It also took some time (hours), reboots, and second trigger of a aborted full text indexing job, but all is working now.

Reply
Branq0 responded on 30 Dec 2015 1:42 AM
Suggested Answer

Thank you for the effort as well. We got stuck in system chceck phase of installation, where checks of Microsoft dynamics CRM database took hours (after we modified timeouts in registry).

However, after removing tables from Fulltext catalogue, upgrade was no problem.

Reply
David Finley responded on 20 Jan 2016 5:36 PM
My Badges
Suggested Answer

Thanks for getting back to us Edward. We understand your apprehension here. Would you mind looking over this blog post we have created to help others, and commenting if this is achieving what you intended.

http://www.interactivewebs.com/blog/index.php/crm/crm-2016-import-upgrade-from-crm-2015-failure-timeout-expired/

Thanks in advance. 

Reply
Mike Van Meerten responded on 10 Feb 2016 5:00 PM
My Badges
Suggested Answer

Thank you for posting this thread.  It helped me solve this timeout issue and upgrading on-prem 2015 to 2016

Reply
Lina Baumberger responded on 23 Feb 2016 7:01 PM
Suggested Answer

CRM 2016 Update 1 was released this week and fixed the import organization system check timeout issue for our 2015 to 2016 upgrade (along with quite a few other things, see KB 3133963 link below).

Download: www.microsoft.com/.../details.aspx

Issues Resolved: support.microsoft.com/.../3133963

Reply
Mike Van Meerten responded on 2 Mar 2016 1:20 PM
My Badges
Suggested Answer

This worked.

Upgrade 2016 first apply 0.1 update, import ORG

Reply

SBX - Two Col Forum

SBX - Migrated JS