locked
Import CRM 2011 Organization on CRM 2013 Deployment Error RRS feed

  • Question

  • Dear All,
    I was trying to import the CRM 2011(rollup 14) Organization on the CRM 2013 deployment manager. It's giving error. I am pasting here. Kindly help.
    On the Deployment Manager Warnings shown as:

    1.The indexes on the Microsoft Dynamics CRM database are not consistent with Microsoft Dynamics CRM indexes.
    2.The stored procedures in the database are not consistent with Microsoft Dynamics CRM stored procedures.
    3.Checking for customizations and extensions that use outdated features. This operation may take a few minutes.
    4.Data encryption will be active after the install or upgrade. We strongly recommend that you copy the organization encryption key and store it in a safe place. For more information, see http://go.microsoft.com/fwlink/?LinkId=316366.

    17:17:55|Verbose| DatabaseAction execution time; Bin\Microsoft.Crm.DataUpgrade.dll:Execute; 00:00:00.7088679
    17:17:55|   Info| 
            Metadata xml upgrade: pass 1

    17:18:56|   Info| CrmAction execution time; UpgradeDatabaseAction; 00:02:39.0238114
    17:18:56|  Error| Installer Complete: OrganizationUpgrader - Error encountered
    17:18:57|  Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed.
    InnerException:
    System.Reflection.TargetInvocationException: 引動過程的目標傳回例外狀況。 ---> Microsoft.Crm.CrmException: Cannot delete OptionSet with id 8f73ed35-7610-4a20-9d94-30bf38a33bc2 because a Attribute with id 0eab4ae9-91d4-433e-a14d-c9ecd6a5622b exists that relates to this OptionSet and delete cascade is restricted
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateNoRelationshipsToExistForDelete(MetadataBusinessEntityMoniker moniker, MetadataRelationshipMetadata relationshipTo, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ProcessRelationshipsForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.Delete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Metadata.OptionSetDeleteAction.DeleteOptionSetAndRelated(Guid optionSetId, MetadataHelper helper)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.HandleAttributeTypeChanges(MetadataBusinessEntity updateData)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.UpdateAttributeTable()
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.MetabaseOperation()
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue_metabaseActionsToExecute(CounterList listCounters)
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()
       於 Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       於 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       於 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       於 System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       於 Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)
       於 Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       於 Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
    InnerException:
    Microsoft.Crm.CrmException: Cannot delete OptionSet with id 8f73ed35-7610-4a20-9d94-30bf38a33bc2 because a Attribute with id 0eab4ae9-91d4-433e-a14d-c9ecd6a5622b exists that relates to this OptionSet and delete cascade is restricted
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateNoRelationshipsToExistForDelete(MetadataBusinessEntityMoniker moniker, MetadataRelationshipMetadata relationshipTo, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ProcessRelationshipsForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.Delete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Metadata.OptionSetDeleteAction.DeleteOptionSetAndRelated(Guid optionSetId, MetadataHelper helper)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.HandleAttributeTypeChanges(MetadataBusinessEntity updateData)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.UpdateAttributeTable()
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.MetabaseOperation()
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue_metabaseActionsToExecute(CounterList listCounters)
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()
       於 Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
    17:18:57|   Info| Setting organization state.  New state = Failed
    17:18:57|  Error| Upgrade Organization with Id=41f84ec3-3ba3-45ed-9e98-65b982e3392c failed with Exception:
    System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: 引動過程的目標傳回例外狀況。 ---> Microsoft.Crm.CrmException: Cannot delete OptionSet with id 8f73ed35-7610-4a20-9d94-30bf38a33bc2 because a Attribute with id 0eab4ae9-91d4-433e-a14d-c9ecd6a5622b exists that relates to this OptionSet and delete cascade is restricted
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateNoRelationshipsToExistForDelete(MetadataBusinessEntityMoniker moniker, MetadataRelationshipMetadata relationshipTo, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ProcessRelationshipsForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.Delete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Metadata.OptionSetDeleteAction.DeleteOptionSetAndRelated(Guid optionSetId, MetadataHelper helper)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.HandleAttributeTypeChanges(MetadataBusinessEntity updateData)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.UpdateAttributeTable()
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.MetabaseOperation()
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue_metabaseActionsToExecute(CounterList listCounters)
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()
       於 Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       於 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       於 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       於 System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       於 Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)
       於 Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       於 Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       於 Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       於 Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
    17:18:57|  Error| An error occurred when trying import and upgrade organization database CRM02.Infortrend_MSCRM:
    Microsoft.Crm.CrmException: Upgrade Organization with Id=41f84ec3-3ba3-45ed-9e98-65b982e3392c failed with Exception:
    System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: 引動過程的目標傳回例外狀況。 ---> Microsoft.Crm.CrmException: Cannot delete OptionSet with id 8f73ed35-7610-4a20-9d94-30bf38a33bc2 because a Attribute with id 0eab4ae9-91d4-433e-a14d-c9ecd6a5622b exists that relates to this OptionSet and delete cascade is restricted
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateNoRelationshipsToExistForDelete(MetadataBusinessEntityMoniker moniker, MetadataRelationshipMetadata relationshipTo, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ProcessRelationshipsForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.Delete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Metadata.OptionSetDeleteAction.DeleteOptionSetAndRelated(Guid optionSetId, MetadataHelper helper)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.HandleAttributeTypeChanges(MetadataBusinessEntity updateData)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.UpdateAttributeTable()
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.MetabaseOperation()
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue_metabaseActionsToExecute(CounterList listCounters)
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()
       於 Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       於 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       於 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       於 System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       於 Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)
       於 Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       於 Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       於 Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       於 Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo) ---> System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: 引動過程的目標傳回例外狀況。 ---> Microsoft.Crm.CrmException: Cannot delete OptionSet with id 8f73ed35-7610-4a20-9d94-30bf38a33bc2 because a Attribute with id 0eab4ae9-91d4-433e-a14d-c9ecd6a5622b exists that relates to this OptionSet and delete cascade is restricted
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateNoRelationshipsToExistForDelete(MetadataBusinessEntityMoniker moniker, MetadataRelationshipMetadata relationshipTo, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ProcessRelationshipsForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.Delete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Metadata.OptionSetDeleteAction.DeleteOptionSetAndRelated(Guid optionSetId, MetadataHelper helper)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.HandleAttributeTypeChanges(MetadataBusinessEntity updateData)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.UpdateAttributeTable()
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.MetabaseOperation()
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue_metabaseActionsToExecute(CounterList listCounters)
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()
       於 Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       於 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       於 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       於 System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       於 Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)
       於 Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       於 Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       於 Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       於 Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
    17:18:57|  Error| Import Organization (Name=Infortrend, Id=41f84ec3-3ba3-45ed-9e98-65b982e3392c) failed with Exception:
    Microsoft.Crm.CrmException: Upgrade Organization with Id=41f84ec3-3ba3-45ed-9e98-65b982e3392c failed with Exception:
    System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: 引動過程的目標傳回例外狀況。 ---> Microsoft.Crm.CrmException: Cannot delete OptionSet with id 8f73ed35-7610-4a20-9d94-30bf38a33bc2 because a Attribute with id 0eab4ae9-91d4-433e-a14d-c9ecd6a5622b exists that relates to this OptionSet and delete cascade is restricted
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateNoRelationshipsToExistForDelete(MetadataBusinessEntityMoniker moniker, MetadataRelationshipMetadata relationshipTo, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ProcessRelationshipsForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.Delete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Metadata.OptionSetDeleteAction.DeleteOptionSetAndRelated(Guid optionSetId, MetadataHelper helper)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.HandleAttributeTypeChanges(MetadataBusinessEntity updateData)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.UpdateAttributeTable()
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.MetabaseOperation()
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue_metabaseActionsToExecute(CounterList listCounters)
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()
       於 Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       於 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       於 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       於 System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       於 Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)
       於 Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       於 Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       於 Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       於 Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo) ---> System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: 引動過程的目標傳回例外狀況。 ---> Microsoft.Crm.CrmException: Cannot delete OptionSet with id 8f73ed35-7610-4a20-9d94-30bf38a33bc2 because a Attribute with id 0eab4ae9-91d4-433e-a14d-c9ecd6a5622b exists that relates to this OptionSet and delete cascade is restricted
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateNoRelationshipsToExistForDelete(MetadataBusinessEntityMoniker moniker, MetadataRelationshipMetadata relationshipTo, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ProcessRelationshipsForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.ValidateForDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.Delete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext sqlContext)
       於 Microsoft.Crm.Metadata.OptionSetDeleteAction.DeleteOptionSetAndRelated(Guid optionSetId, MetadataHelper helper)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.HandleAttributeTypeChanges(MetadataBusinessEntity updateData)
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.UpdateAttributeTable()
       於 Microsoft.Crm.Metadata.AttributeUpdateAction.MetabaseOperation()
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue_metabaseActionsToExecute(CounterList listCounters)
       於 Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()
       於 Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       於 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       於 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       於 System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       於 Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
       於 Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)
       於 Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       於 Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       於 Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       於 Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       於 Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
       --- 內部例外狀況堆疊追蹤的結尾 ---
       於 Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
       於 Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Execute(Object obj)
    17:18:57|   Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 302.

          
    Thursday, August 21, 2014 10:50 AM

All replies

  • I would suggest you do a SQL database query to find out (a) what entity+attribute this is affecting and (b) the option set that is causing the issue. Then you might have a better idea of what is going on.

    Maybe you have a custom attribute using a system option set that the upgrade wizard needs to delete/recreate. I think that could cause the problem.

    Thursday, August 21, 2014 11:01 AM
  • Dear All:

    The information, as below

    select * from OptionSet  where OptionSetid ='8f73ed35-7610-4a20-9d94-30bf38a33bc2'

    OptionSetId
    8F73ED35-7610-4A20-9D94-30BF38A33BC2

    OptionSetRowId
    739A332B-8176-4006-B7E9-67F7C206548B

    Name
    principalobjectaccessreadsnapshot_objecttypecode

    OptionSetType IsGlobal IsCustomOptionSet
    0 0 0

    VersionNumber
    0x000000000030E3A5

    SolutionId
    FD140AAD-4DF4-11DD-BD17-0019B9312238

    SupportingSolutionId
    00000000-0000-0000-0000-000000000000

    ComponentState OverwriteTime IsCustomizable IsManaged IntroducedVersion
    0 1900-01-01 00:00:00.000 0 1

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

    select * from MetadataSchema.Attribute where AttributeId= '0eab4ae9-91d4-433e-a14d-c9ecd6a5622b'

    AttributeId
    0EAB4AE9-91D4-433E-A14D-C9ECD6A5622B

    AttributeTypeId
    00000000-0000-0000-00AA-110000000030

    Name
    objecttypecode

    PhysicalName
    ObjectTypeCode

    Length IsNullable XmlAbbreviation EntityId DefaultValue
    4 0 F50308A8-B972-4247-A31F-7D7FDF97D4FC

    ColumnNumber ValidForUpdateAPI LogicalName ValidForReadAPI

    1 0 objecttypecode 0

    ValidForCreateAPI VisibleToPlatform IsPKAttribute IsCustomField IsLogical DisplayMask
    0 1 0 0 0 1024

    ReferencedEntityObjectTypeCode
    0
    IsSortAttribute
    0
    IsIdentity
    0
    IsReplicated
    1

    VersionNumber
    0x000000000030E3A7

    AttributeRowId
    E5C96E25-880A-4C6E-9CD9-6C4FB7ECC916

    AppDefaultValue
    -1
    Locked
    0
    AttributeImeModeId
    auto
    AttributeRequiredLevelId
    systemrequired

    MaxValue
    2147483647
    MinValue
    0
    HasMultipleLabels
    0
    IsRowGuidAttribute
    0
    IsAuditEnabled
    0
    OptionSetId
    8F73ED35-7610-4A20-9D94-30BF38A33BC2
    SolutionId
    FD140AAD-4DF4-11DD-BD17-0019B9312238
    SupportingSolutionId
    00000000-0000-0000-0000-000000000000
    ComponentState
    0
    OverwriteTime
    1900-01-01 00:00:00.000
    IsStoredOnPrimaryTable
    1
    IsInheritanceTypeAttribute
    0
    TableColumnName
    ObjectTypeCode
    IsUnmanagedAttribute
    0
    IsOneWayBooleanAttribute
    0
    IsCustomizable
    0
    IsRenameable
    0
    CanModifySearchSettings
    0
    CanModifyRequirementLevelSettings
    0
    CanBeSecuredForCreate
    0
    CanBeSecuredForRead
    0
    CanBeSecuredForUpdate
    0
    IsSecured
    0
    IsManaged
    1
    CanModifyAdditionalSettings
    1
    CanModifyAuditSettings
    1
    IsEncrypted
    0


    Friday, August 22, 2014 7:19 AM
  • are there triggers in the DB? delete them and try again..

    gruss Daniel Ovadia MBSS - Microsoft Dynamics CRM MCNPS

    Friday, August 22, 2014 7:22 AM
  • the last post shows that the attribute belongs to managed solution with id 0019B9312238. Is it possible to delete the managed solution and import it again after upgrade?.

    please take backups before trying this.

    As you might be aware, any custom indexes, stored procedures etc needs to be removed before the upgrade.

    regards,

    Jithesh

    • Proposed as answer by Daniel Ovadia Monday, March 2, 2015 3:04 PM
    Friday, August 22, 2014 8:53 AM