locked
2011 to 2013 upgrade - Sdk Messages import failure RRS feed

  • Question

  • Hi

    I have performed an in-place upgrade of CRM 4.0 to 2011 and again to 2013, but the 2013 org upgrade failed.

    The in-place initial upgrade of CRM 4.0 to CRM 2011 worked ok.

    Plugin Sdk Message Processing Steps and plugins assemblies were all removed from CRM 2011 since they haven’t been upgraded yet to the 2011/13 SDK and the upgrade will fail them in the legacy feature check.

    Then I performed an in-place upgrade from CRM 2011 to CRM 2013 and got an Sdk Messages import failure.

    Any suggestions on what the problem might and how to resolve?

    log snippet...

    14:54:05|Verbose| Saved Query Visualizations for ObjectTypeCode 3 imported

    14:54:05|Verbose| Saved Query Visualizations for ObjectTypeCode 1088 imported

    14:54:05|Verbose| Plugin Types import: Success

    14:54:05|Verbose| Plugin Types import: Success

    14:54:05|  Error| System.Exception: Action Microsoft.Crm.Tools.Admin.ImportDefaultDataAction failed. ---> Microsoft.Crm.Tools.ImportExportPublish.ImportSdkMessagesException: Sdk Messages import: FAILURE ---> Microsoft.Crm.CrmException: Crm Internal Exception: Singleton Retrieve Query should not return more than 1 record. Query Executed = System.Data.SqlClient.SqlCommand

       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.GetValuesFromDatabase(String entityName, Guid entityId, Boolean allowNonUniqueRows, ArrayList attributes, ArrayList extraConditions, Boolean isRetrieveUnpublished, ExecutionContext context)

       at Microsoft.Crm.BusinessEntities.SecurityAttributes..ctor(SecurityTraits traits, Guid objectId, Boolean allowNonUniqueRows, ArrayList attributes, ExecutionContext context)

       at Microsoft.Crm.BusinessEntities.SecurityExtension.CreateSecurityAttributesForUpdateDelete(Object sender, SecurityTraits traits, ExtensionEventArgs e)

       at Microsoft.Crm.BusinessEntities.SecurityExtension.PreUpdateHandler(ExtensionEventArgs e, Object sender)

       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.PreUpdateEventHandler.Invoke(Object sender, ExtensionEventArgs e)

       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.UpdateWithPipelineAndExtensions(IBusinessEntity entity, ExecutionContext context)

       at Microsoft.Crm.ObjectModel.SdkMessageProcessingStepServiceInternal`1.Update(IBusinessEntity entity, ExecutionContext context)

       at Microsoft.Crm.Tools.ImportExportPublish.ImportEntityHandlerBase.EnsureEntityExisted(BusinessProcessObject service, EntityExpression expression, BusinessEntity entity, ExecutionContext context)

       at Microsoft.Crm.Tools.ImportExportPublish.ImportEntityHandlerBase.EnsureEntityExisted(BusinessProcessObject service, BusinessEntity entity, ExecutionContext context)

       at Microsoft.Crm.Tools.ImportExportPublish.ImportSdkMessagesHandler.ImportSdkMessagerProcessingSteps(SdkMessage message, SdkMessageFilter filter, XmlNodeList stepNodes)

       at Microsoft.Crm.Tools.ImportExportPublish.ImportSdkMessagesHandler.ImportSdkMessageFilters(XmlNode messageNode, SdkMessage message)

       at Microsoft.Crm.Tools.ImportExportPublish.ImportSdkMessagesHandler.ImportSdkMessages(XmlNodeList sdkMessageNodes)

       --- End of inner exception stack trace ---

       at Microsoft.Crm.Tools.ImportExportPublish.ImportSdkMessagesHandler.ImportSdkMessages(XmlNodeList sdkMessageNodes)

       at Microsoft.Crm.Tools.ImportExportPublish.ImportSdkMessagesHandler.ImportItem()

       at Microsoft.Crm.Tools.ImportExportPublish.ImportHandler.Import()

       at Microsoft.Crm.Tools.ImportExportPublish.RootImportHandler.RunImport()

       at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.OrganizationImportDefaultData(Guid organizationId, Version existingDatabaseVersion, XmlDocument importXmlDoc, Boolean setup, String importFilePath)

       at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.OrganizationImportDefaultData(Guid organizationId, Version existingDatabaseVersion, String importFile)

       at Microsoft.Crm.Tools.Admin.ImportDefaultDataAction.Do(IDictionary parameters)

       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)

       --- End of inner exception stack trace ---, Error, RetryCancel, Option1

    14:58:56|   Info| InputResult: Cancel

    14:58:56|   Info| CrmAction execution time; ImportDefaultDataAction; 00:08:01.7665460

    14:58:56|  Error| Installer Complete: OrganizationUpgrader - Error encountered

     

    Cheers

    Richard


    • Edited by richard.w Thursday, July 31, 2014 11:54 PM
    Thursday, July 31, 2014 11:52 PM

All replies

  • Hi,

    Before going to upgrade CRM 2011 to 2013 you need to check the data base is having any kind of JS scripts or any SDK's which will not support for CRM 2013.

    For more details

    http://msdn.microsoft.com/en-us/library/dn281891.aspx

    http://blogs.msdn.com/b/crmindia/archive/2013/09/20/legacy-feature-check-and-custom-code-validation-tool-demos-for-upgrade-to-crm-2013.aspx

    Run the CRM 2013 LegacyFeatureCheck tool in CRM 2011 server to check the issues 

    http://go.microsoft.com/fwlink/p/?LinkID=309565

    Kindly share your experience after this...

    Thanks. 


    Vinay Kumar.

    Friday, August 1, 2014 4:32 AM
  • Hi Vinay

    I performed these checked first before the 2011 to 2013 upgrade.  Dropped out some JavaScript, ISV folder contents and all the plugins.  The crm 2013 server install also blocks at the start if there unsupported customizations present when it does the legacy feature check (which it did as I had missed moving out the ISV folder contents).

    I cannot run the tools against 2011, as the crm 2013 install has completed - but the in-place org upgrade failed.

    Cheers

    Richard

    Sunday, August 3, 2014 10:06 PM
  • HI,

    Before doing this things, have you took 2011 Data base copy a side ????

    What is the error log you have got after in place upgrade org import 

    I guess you are performing the same import action on failed data base.. remove the failed data base latter on restore 2011 DB and import to 2011 . Here make sure you don't have issues in LegacyFeatureCheck if you have remove it or update. then go for crm 2013 install and upgrade !!

    Thanks 


    Vinay Kumar.


    Monday, August 4, 2014 4:51 AM
  • Hi Vinay,

    Thanks for your answer.

    Unfortunately there is no crm 2011 database backup, the plan is to revert to a snapshot of the CRM 4.0 system before the 2011 & 2013 in-place upgrades.  This is dev system. 

    I haven't attempted an import on the failed database - the log above is from the 2013 in-place upgrade. 

    I will repeat the CRM 2011 and CRM 2013 upgrades after we rollback.  I'll re-check legacy issues again.

    The log error above would tend indicate a duplicate record ('Singleton Retrieve Query should not return more than 1 record') in one the SDK Message tables, but without knowing the actual query performed, it hard to see what the problem is.   Only way to find that I guess is to run SQL Profiler during the upgrade.

    Cheers

    Richard

     

    Monday, August 4, 2014 5:49 AM