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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

On Premise V9 import failure

(0) ShareShare
ReportReport
Posted on by 4
I am trying to import my Organization into the Onpremise V9 update and I get and error trying to drop the constraint on the topicmodelbase table.

*This post is locked for comments

I have the same question (0)
  • CU02122005-1 Profile Picture
    4 on at

    Here is the pertinent log file entries.

    13:51:04|   Info| Deleted RibbonTabToCommandMap with controlid='Mscrm.Form.lead.ConvertLeadAs', entity='lead'

    13:51:04|   Info| Deleted RibbonTabToCommandMap with controlid='Mscrm.Form.opportunity.SetActiveStage', entity='opportunity'

    13:51:04|   Info| Deleted RibbonTabToCommandMap with controlid='Mscrm.Form.opportunity.SetActiveStage', entity='opportunity'

    13:51:04|   Info| Deleted RibbonTabToCommandMap with controlid='Mscrm.HomepageGrid.incident.Send', entity='incident'

    13:51:04|   Info| Deleted RibbonTabToCommandMap with controlid='Mscrm.SubGrid.incident.MergeRecords', entity='incident'

    13:51:07|Verbose| DatabaseAction execution time; Bin\Microsoft.Crm.SE.DatabaseActions.dll:Execute; 00:00:04.6874840

    13:51:07|   Info| Executing: action Bin\Microsoft.Crm.Setup.DiffBuilder.dll:UpgradeSystemAndMetadataDiffIndexManagementDataWithDelete with id 343934bb-b5c9-4d63-ba3c-21fb63b0eae0 of type DllMethod to Diff indexes with delete for upgrade.

    13:51:07|   Info| Diff indexes with delete for upgrade

    13:51:12|   Info| Deleting standard index Name='cndx_PrimaryKey_OpportunityCompetitors'

    13:51:12|   Info| Deleting standard index Name='PK_topicmodelBase'

    13:51:13|   Info| Action Bin\Microsoft.Crm.Setup.DiffBuilder.dll:UpgradeSystemAndMetadataDiffIndexManagementDataWithDelete with id 343934bb-b5c9-4d63-ba3c-21fb63b0eae0 of type DllMethod to Diff indexes with delete for upgrade failed on attempt 2. Retrying in 30 seconds. Exception: Exception has been thrown by the target of an invocation.

    13:51:47|   Info| Deleting standard index Name='PK_topicmodelBase'

    13:51:47|   Info| Action Bin\Microsoft.Crm.Setup.DiffBuilder.dll:UpgradeSystemAndMetadataDiffIndexManagementDataWithDelete with id 343934bb-b5c9-4d63-ba3c-21fb63b0eae0 of type DllMethod to Diff indexes with delete for upgrade failed on attempt 3. Retrying in 30 seconds. Exception: Exception has been thrown by the target of an invocation.

    13:52:22|   Info| Deleting standard index Name='PK_topicmodelBase'

    13:52:22|  Error| Applying database updates to organization with name = RMAuctions Id=91291a51-489e-e011-b627-000c295fc1cb failed with Exception:

    Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.Setup.DiffBuilder.dll:UpgradeSystemAndMetadataDiffIndexManagementDataWithDelete on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: The constraint 'PK_topicmodelBase' is being referenced by table 'TopicModelExecutionHistoryBase', foreign key constraint 'topicmodel_topicmodelexecutionhistory'.

    Could not drop constraint. See previous errors.

      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)

      at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

      at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)

      at Microsoft.Crm.CrmDbConnection.<>c__DisplayClass106_0.<InternalExecuteNonQuery>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)

      at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.ExecuteDropIndexOrConstraintInSqlIfExists(DropIndexData dropData, IDbCommand command, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.DropIndexOrConstraintInSqlIfExistsInternal(DropIndexData dropData, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.DropIndexesFromSQLByIndexIds(List`1 indexIds, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.SqlStandardIndexHandler.DeleteIndexes(IIndexDiffManager indexDiffManager, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.SqlStandardIndexHandler.ProcessIndexDiffManagerData(IIndexDiffManager indexDiffManager, IIndexMetadataProvider metadataProvider, ISqlExecutionContext sqlContext, Boolean processDeletes)

      at Microsoft.Crm.Setup.IndexAndConstraintUpgradeService.UpgradeIndexManagementData(String metadataXmlPath, Boolean processDeletes, Boolean systemIndexesOnly, Boolean useMetadataDiffs)

      at Microsoft.Crm.Setup.IndexAndConstraintUpgradeService.UpgradeSystemAndMetadataDiffIndexManagementDataWithDelete(String metadataXmlPath, String targetVersion)

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

      at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

      at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

      at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

      at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)

      at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId, Nullable`1 operationType)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall, Int32 languageCode)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass92_0.<Install>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass94_0.<InstallUpdate>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.ApplyDBUpdates(Guid orgId, Nullable`1 operationType, Int32 langCode, String releaseFilePath)

      at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdatesInternal(Guid orgId, String orgUniqueName, String releaseFilePath, OrganizationOperationType operationType, Boolean isXrm, Int32 langCode)

    13:52:22|   Info| CrmAction execution time; InstallDatabaseUpdatesAction; 00:02:35.9751382

    13:52:22|  Error| Installer Complete: OrganizationDBUpdateInstaller - Error encountered

    13:52:22|  Error| Exception occurred during Microsoft.Crm.Tools.Admin.OrganizationDBUpdateInstaller: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction

    InnerException:

    Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.Setup.DiffBuilder.dll:UpgradeSystemAndMetadataDiffIndexManagementDataWithDelete on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: The constraint 'PK_topicmodelBase' is being referenced by table 'TopicModelExecutionHistoryBase', foreign key constraint 'topicmodel_topicmodelexecutionhistory'.

    Could not drop constraint. See previous errors.

      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)

      at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

      at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)

      at Microsoft.Crm.CrmDbConnection.<>c__DisplayClass106_0.<InternalExecuteNonQuery>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)

      at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.ExecuteDropIndexOrConstraintInSqlIfExists(DropIndexData dropData, IDbCommand command, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.DropIndexOrConstraintInSqlIfExistsInternal(DropIndexData dropData, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.DropIndexesFromSQLByIndexIds(List`1 indexIds, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.SqlStandardIndexHandler.DeleteIndexes(IIndexDiffManager indexDiffManager, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.SqlStandardIndexHandler.ProcessIndexDiffManagerData(IIndexDiffManager indexDiffManager, IIndexMetadataProvider metadataProvider, ISqlExecutionContext sqlContext, Boolean processDeletes)

      at Microsoft.Crm.Setup.IndexAndConstraintUpgradeService.UpgradeIndexManagementData(String metadataXmlPath, Boolean processDeletes, Boolean systemIndexesOnly, Boolean useMetadataDiffs)

      at Microsoft.Crm.Setup.IndexAndConstraintUpgradeService.UpgradeSystemAndMetadataDiffIndexManagementDataWithDelete(String metadataXmlPath, String targetVersion)

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

      at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

      at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

      at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

      at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)

      at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId, Nullable`1 operationType)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall, Int32 languageCode)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass92_0.<Install>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass94_0.<InstallUpdate>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.ApplyDBUpdates(Guid orgId, Nullable`1 operationType, Int32 langCode, String releaseFilePath)

      at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdatesInternal(Guid orgId, String orgUniqueName, String releaseFilePath, OrganizationOperationType operationType, Boolean isXrm, Int32 langCode)

      at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdates(Guid orgId, String orgUniqueName, OrganizationOperationType operationType, Boolean isXrm, Int32 langCode)

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

      at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)

    13:52:22|   Info| Setting organization state.  New state = Failed

    13:52:23|Verbose| Retrieving database base language code Data Source=CRM2016;Initial Catalog=RMAuctions_MSCRM;Integrated Security=True;Enlist=False;Connect Timeout=150;Application Name=MSCRMmmc;Workstation ID=CRM2016.mmc ...

    13:52:23|   Info| Database base language code: 1033.

    13:52:23|Verbose| Begin: Check if CRM Solutions are installed Data Source=CRM2016;Initial Catalog=RMAuctions_MSCRM;Integrated Security=True;Enlist=False;Connect Timeout=150;Application Name=MSCRMmmc;Workstation ID=CRM2016.mmc

    13:52:23|Verbose| End: Check if CRM Solutions are installed isXrmOrg = False

    13:52:23|Verbose| Retrieving database base language code Data Source=CRM2016;Initial Catalog=RMAuctions_MSCRM;Integrated Security=True;Enlist=False;Connect Timeout=150;Application Name=MSCRMmmc;Workstation ID=CRM2016.mmc ...

    13:52:23|   Info| Database base language code: 1033.

    13:52:23|Verbose| Begin: Check if CRM Solutions are installed Data Source=CRM2016;Initial Catalog=RMAuctions_MSCRM;Integrated Security=True;Enlist=False;Connect Timeout=150;Application Name=MSCRMmmc;Workstation ID=CRM2016.mmc

    13:52:23|Verbose| End: Check if CRM Solutions are installed isXrmOrg = False

    13:52:24|  Error| Import Organization (Name=RMAuctions, Id=91291a51-489e-e011-b627-000c295fc1cb) failed with Exception:

    System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction ---> Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.Setup.DiffBuilder.dll:UpgradeSystemAndMetadataDiffIndexManagementDataWithDelete on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: The constraint 'PK_topicmodelBase' is being referenced by table 'TopicModelExecutionHistoryBase', foreign key constraint 'topicmodel_topicmodelexecutionhistory'.

    Could not drop constraint. See previous errors.

      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)

      at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

      at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)

      at Microsoft.Crm.CrmDbConnection.<>c__DisplayClass106_0.<InternalExecuteNonQuery>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)

      at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.ExecuteDropIndexOrConstraintInSqlIfExists(DropIndexData dropData, IDbCommand command, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.DropIndexOrConstraintInSqlIfExistsInternal(DropIndexData dropData, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.DropIndexesFromSQLByIndexIds(List`1 indexIds, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.SqlStandardIndexHandler.DeleteIndexes(IIndexDiffManager indexDiffManager, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.SqlStandardIndexHandler.ProcessIndexDiffManagerData(IIndexDiffManager indexDiffManager, IIndexMetadataProvider metadataProvider, ISqlExecutionContext sqlContext, Boolean processDeletes)

      at Microsoft.Crm.Setup.IndexAndConstraintUpgradeService.UpgradeIndexManagementData(String metadataXmlPath, Boolean processDeletes, Boolean systemIndexesOnly, Boolean useMetadataDiffs)

      at Microsoft.Crm.Setup.IndexAndConstraintUpgradeService.UpgradeSystemAndMetadataDiffIndexManagementDataWithDelete(String metadataXmlPath, String targetVersion)

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

      at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

      at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

      at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

      at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)

      at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId, Nullable`1 operationType)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall, Int32 languageCode)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass92_0.<Install>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass94_0.<InstallUpdate>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.ApplyDBUpdates(Guid orgId, Nullable`1 operationType, Int32 langCode, String releaseFilePath)

      at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdatesInternal(Guid orgId, String orgUniqueName, String releaseFilePath, OrganizationOperationType operationType, Boolean isXrm, Int32 langCode)

      at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdates(Guid orgId, String orgUniqueName, OrganizationOperationType operationType, Boolean isXrm, Int32 langCode)

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

      at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)

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

      at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass83_0.<DoAction>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass67_0.<Install>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)

      at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()

      at Microsoft.Crm.Tools.Admin.OrganizationDBUpdateInstaller.Execute()

      at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Import(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String sqlServerName, String databaseName, Uri reportServerUrl, ICollection`1 users, MultipleTenancy multipleTenancy, Boolean patchOnImport, OrgDbUpdateMode orgDbUpdateMode)

    13:52:25|   Info| Found the older table DBUpdateInstallInfo_V5, updating new table and deleting

    13:52:25|   Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 9.0.0002.2003.

    13:52:47|  Error| Import Organization (Name=RMAuctions, Id=91291a51-489e-e011-b627-000c295fc1cb) failed with Exception:

    System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction ---> Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.Setup.DiffBuilder.dll:UpgradeSystemAndMetadataDiffIndexManagementDataWithDelete on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: The constraint 'PK_topicmodelBase' is being referenced by table 'TopicModelExecutionHistoryBase', foreign key constraint 'topicmodel_topicmodelexecutionhistory'.

    Could not drop constraint. See previous errors.

      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)

      at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

      at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)

      at Microsoft.Crm.CrmDbConnection.<>c__DisplayClass106_0.<InternalExecuteNonQuery>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)

      at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.ExecuteDropIndexOrConstraintInSqlIfExists(DropIndexData dropData, IDbCommand command, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.DropIndexOrConstraintInSqlIfExistsInternal(DropIndexData dropData, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.DropIndexesFromSQLByIndexIds(List`1 indexIds, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.SqlStandardIndexHandler.DeleteIndexes(IIndexDiffManager indexDiffManager, ISqlExecutionContext sqlContext)

      at Microsoft.Crm.Metadata.SqlStandardIndexHandler.ProcessIndexDiffManagerData(IIndexDiffManager indexDiffManager, IIndexMetadataProvider metadataProvider, ISqlExecutionContext sqlContext, Boolean processDeletes)

      at Microsoft.Crm.Setup.IndexAndConstraintUpgradeService.UpgradeIndexManagementData(String metadataXmlPath, Boolean processDeletes, Boolean systemIndexesOnly, Boolean useMetadataDiffs)

      at Microsoft.Crm.Setup.IndexAndConstraintUpgradeService.UpgradeSystemAndMetadataDiffIndexManagementDataWithDelete(String metadataXmlPath, String targetVersion)

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

      at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

      at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

      at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

      at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)

      at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId, Nullable`1 operationType)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass85_1.<ExecuteReleases>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall, Int32 languageCode)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass92_0.<Install>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Database.DatabaseInstaller.<>c__DisplayClass94_0.<InstallUpdate>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.ApplyDBUpdates(Guid orgId, Nullable`1 operationType, Int32 langCode, String releaseFilePath)

      at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdatesInternal(Guid orgId, String orgUniqueName, String releaseFilePath, OrganizationOperationType operationType, Boolean isXrm, Int32 langCode)

      at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdates(Guid orgId, String orgUniqueName, OrganizationOperationType operationType, Boolean isXrm, Int32 langCode)

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

      at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)

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

      at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteActionHelper(CrmAction action, IDictionary parameters, Boolean undo)

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass83_0.<DoAction>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Setup.Shared.Installer.<>c__DisplayClass67_0.<Install>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)

      at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)

      at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()

      at Microsoft.Crm.Tools.Admin.OrganizationDBUpdateInstaller.Execute()

      at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Import(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String sqlServerName, String databaseName, Uri reportServerUrl, ICollection`1 users, MultipleTenancy multipleTenancy, Boolean patchOnImport, OrgDbUpdateMode orgDbUpdateMode)

  • awalters Profile Picture
    3,079 on at

    Easiest way I've found to work around this is to turn off full text indexing, wait 24 hours, then re-import.  There's another way that involves scripts to drop tables, but this feels cleaner if it's feasible.

    That being said, even if you get past this there's another error that I haven't seen anyone get past in a supported way - there are multiple MS cases open about it, and it's been escalated.

  • awalters Profile Picture
    3,079 on at

    Thread on the blocking issue is here:  community.dynamics.com/.../868702

  • Senth Profile Picture
    on at

    Could you please share the scripts to drop tables? I just want to try this in non prod.

  • awalters Profile Picture
    3,079 on at

    This was the advice given to me last upgrade (note: I didn't do it this way this time, so can't vouch, but seems like it should still work):  community.dynamics.com/.../201943

  • Steeve G Profile Picture
    on at

    a quick question, topics.... tables error are not in full text search. Why do we need to deactivate Full Text Search and why should I wait 24 hours?

  • Verified answer
    indlad Profile Picture
    450 on at

    To fix this issue request hotfix from Microsoft for V9 with version number 9.0.2.4010.

    OR

    Take backup of your organization Database

    run the following script and drop all the Constraints from the tables.

    IF OBJECT_ID('tempdb..#DropForeignKeysStatement') IS NOT NULL DROP TABLE #DropForeignKeysStatement

    SELECT DropStatement = 'ALTER TABLE [dbo].[' + st.name + '] DROP CONSTRAINT [' + sfk.name + ']'

       INTO #DropForeignKeysStatement

       FROM sys.foreign_keys sfk

       INNER JOIN sys.tables st ON sfk.parent_object_id = st.object_id

           AND sfk.schema_id = st.schema_id

       WHERE sfk.schema_id = schema_id('dbo')

    SELECT DropStatement FROM #DropForeignKeysStatement

    DECLARE dropStatementCursor CURSOR FOR

       (SELECT DropStatement FROM #DropForeignKeysStatement);

    OPEN dropStatementCursor;

    DECLARE @currentStatement NVARCHAR(max);

    FETCH NEXT FROM dropStatementCursor INTO @currentStatement;

    WHILE @@FETCH_STATUS = 0

    BEGIN

       EXEC sp_executesql @currentStatement;

       FETCH NEXT FROM dropStatementCursor INTO @currentStatement;

    END

    CLOSE dropStatementCursor;

    DEALLOCATE dropStatementCursor;

    IF OBJECT_ID('tempdb..#DropForeignKeysStatement') IS NOT NULL DROP TABLE #DropForeignKeysStatement

    Re-import your organization. During the import process, these deleted constraints will be added back.

  • Charles Lafleur Profile Picture
    5 on at

    In case it could help, here is a link to Dynamics 365 V9.0.3.0007

    www.microsoft.com/.../details.aspx

  • Javeds Profile Picture
    30 on at

    Even 0.3 patch didn't work...

    I have open case with MSP let see what they reply on this...

  • Suggested answer
    Javeds Profile Picture
    30 on at

    Guys -- Try you luck with this release

    www.microsoft.com/.../confirmation.aspx

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Varsha deshpande Profile Picture

Varsha deshpande 5

#2
JS-09031509-0 Profile Picture

JS-09031509-0 3

#3
Ciprian  P Profile Picture

Ciprian P 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans