web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Upgrade on-premise 8.2 to 9.0 errors

(0) ShareShare
ReportReport
Posted on by 177

HI,

I recently downloaded the MS on-premise installer for 9.0 (just released a few days ago), and I configured a new VM for the server requirements.  The installation went fine, and I can create new organizations with no issue, but I cannot import (upgrade) any of the organizations from 8.2.  Here are some of the errors:

  • emcfThe following connections need to be closed before setup can continue:  Login: server\Administrator, Host: CRMSERVER.mmc, Database: CRMDEV_MSCRM  User: Administrator, Program: MSCRMmmc (seems like this is deployment manager?)  

Error| Upgrade Organization with Id=1121758c-044b-e411-919c-00155d59ba12 failed with Exception:

System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.DataUpgrade.dll:TrackCustomDatabaseObjects on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.Smo, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
   at Microsoft.Crm.DataUpgrade.DatabaseObjectChangeTracker.GenerateScriptForIndex(String tableName, String indexName, ISqlExecutionContext sqlContext)
   at Microsoft.Crm.DataUpgrade.DatabaseObjectChangeTracker.InsertObjectTrackerTableInput(List`1 inputData, String tableName, ISqlExecutionContext sqlContext)
   at Microsoft.Crm.DataUpgrade.DatabaseChangeTracker.TrackCustomDatabaseObjects()
   --- End of inner exception stack trace ---

 An error occurred when trying import and upgrade organization database CRMSERVER.CRMDEV_MSCRM:
Microsoft.Crm.CrmException: Upgrade Organization with Id=1121758c-044b-e411-919c-00155d59ba12 failed with Exception:
System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.DataUpgrade.dll:TrackCustomDatabaseObjects on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.Smo, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

*This post is locked for comments

I have the same question (0)
  • awalters Profile Picture
    3,079 on at

    I'm getting a very similar error, but the file mine is saying it can't find is Microsoft.SqlServer.ConnectionInfo.  The weird thing is - my 8.2 database was on SQL 2016, and the 9.0 is currently pointing to 2016 (just different instances on the same server, same version).  2016 is version 13 - why is it looking for version 11 assemblies?

  • Suggested answer
    Community Member Profile Picture
    on at

    I had the same problem. Did you roll out a new Azure SQL 2016 SP2 VM as db server? It seems the SDK 2012 is no longer part of the installation in Azure (and needed for the upgrade). After installing the SQL Server SDK Assemblies for 2012, the import of the 8.2.2 org went fine for me. Please download and install the packages below on your sql server:

    1. Install Microsoft SQL Server System CLR Types.(X86 Package,X64 Package)

    2. Install Microsoft SQL Server Shared Management Objects.(X86 Package,X64 Package)

    Don't forget to reboot!

    Hope this will fix your problem!

  • Community Member Profile Picture
    on at

    I'm having a problem with SQL Native Client 11.4.

    The dynamics 365 v9 setup says it failed to download the file.

    And I can't find that version anywhere

  • awalters Profile Picture
    3,079 on at

    Can't speak for the OP, though I'm relatively sure we're having the same issue, but...I installed those, rebooted, and the import is still failing with the same message.

    As for Dark.Avatar's question - that's a separate issue.  I honestly never could find it either, and had to turn off IE ESC on my server to allow it to be downloaded directly by the installer.

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi Guys,

    if you encounter errors, please provide the feedback to below article. I believed Microsoft will monitor this and able to give you guys answer quickly.

    docs.microsoft.com/.../install-or-upgrade-microsoft-dynamics-365-server

    docs.microsoft.com/.../a-new-feedback-system-is-coming-to-docs

  • awalters Profile Picture
    3,079 on at

    Apparently the packages linked to above (2012 SQLSysClrTypes and SharedManagementObjects) need to be installed on the CRM server, not the SQL server.  Did that and finally got past the error I was having.  Guessing you likely will too, since yours is an SMO assembly that it can't.  I'm now getting another error, mind you, but made it much further...

  • CRM2013USER Profile Picture
    177 on at

    Hello all:

    I was definitely able to make it a lot further with the import (Upgrade) with the install of those two packages, so thank you for that information.  Just happened to be that my SQL Server and CRM server are on the same VM.

    Have one of the same errors - can't figure this one out as I have no connections open except Deployment Manager:

    Error| The following connections need to be closed before setup can continue:
    10:25:47|  Error|     Login: CRMSERVER\Administrator, Host: D365V9.mmc, Database: CRMDEV_MSCRM, User: Administrator, Program: MSCRMmmc

    other errors:

    Error| Installer Complete: OrganizationUpgrader - Error encountered
    10:48:36|  Error| Exception occurred during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction
    InnerException:
    Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.ObjectModel.dll:InstallStoredProcedures on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.CrmException: Error installing sp with name=EntityIdCollectionCreation
    Cannot drop type 'dbo.EntityIdCollection' because it is being referenced by object 'p_GrantAccessBulkForCreate'. There may be other objects that reference this type. ---> System.Data.SqlClient.SqlException: Cannot drop type 'dbo.EntityIdCollection' because it is being referenced by object 'p_GrantAccessBulkForCreate'. There may be other objects that reference this type.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)

     

     Error| Upgrade Organization with Id=1121758c-044b-e411-919c-00155d59ba12 failed with Exception:
    System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.ObjectModel.dll:InstallStoredProcedures on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.CrmException: Error installing sp with name=EntityIdCollectionCreation
    Cannot drop type 'dbo.EntityIdCollection' because it is being referenced by object 'p_GrantAccessBulkForCreate'. There may be other objects that reference this type. ---> System.Data.SqlClient.SqlException: Cannot drop type 'dbo.EntityIdCollection' because it is being referenced by object 'p_GrantAccessBulkForCreate'. There may be other objects that reference this type.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

    Error| An error occurred when trying import and upgrade organization database CRMSERVER.CRMDEV_MSCRM:
    Microsoft.Crm.CrmException: Upgrade Organization with Id=1121758c-044b-e411-919c-00155d59ba12 failed with Exception:
    System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction ---> Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.ObjectModel.dll:InstallStoredProcedures on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.CrmException: Error installing sp with name=EntityIdCollectionCreation
    Cannot drop type 'dbo.EntityIdCollection' because it is being referenced by object 'p_GrantAccessBulkForCreate'. There may be other objects that reference this type. ---> System.Data.SqlClient.SqlException: Cannot drop type 'dbo.EntityIdCollection' because it is being referenced by object 'p_GrantAccessBulkForCreate'. There may be other objects that reference this type.

  • awalters Profile Picture
    3,079 on at

    The first error about connections happens every time in mine, and then it keeps going, so I think it resolves itself.  The second one seems to be talking about a stored procedure...do you know if anyone has added/modified any stored procedures?  I'm not getting this error, so I'm wondering if there's a possibility it's related to a customization.

  • CRM2013USER Profile Picture
    177 on at

    hi Allison, 

    Good point about the connections, and the second error is connected to an OOTB stored proc, and I have not really found anything related to that error yet, but I'll keep looking.  We have tons of custom SP's due to the many custom SSRS reports, so not sure if that might be related, but we will keep that in mind.  Thanks!

  • alen1979 Profile Picture
    727 on at

    Hi both


    I'm upgrading from CRM2013 to 365 V9 and getting as well the error:

    Cannot drop type 'dbo.EntityIdCollection' because it is being referenced by object 'p_GrantAccessBulkForCreate'. 

    Have you been able to solve this issue somehow? Have you raised with MS already?

    It's already the 3rd issue major issue during the upgrade...what a nightmare!

    Thanks

    Alen

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans