0

Hello,



While trying to import an organisation from 8.2.2.112 to v9 with the "final" Dynamics 365 Server 9.00.0002.3034, I'm stuck with several "Could not drop constraint" errors:

 



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 'cndx_PrimaryKey_Product' is being referenced by table 'OpportunityProductBase', foreign key constraint 'opportunity_products'.

Could not drop constraint. See previous errors.





This is now happening with the table "OpportunityProductBase", but before I had the same error with tables "PriceLevelBase", "InvoiceBase", "AccountBase", "QuoteDetailBase", "SalesOrderDetailBase", "RecommendaitionModelVersionBase", "SalesLiteratureItemBase", ... For those tables I had to delete all foreign keys pointing to the table PK to get the import continue. For 5 tables it's an acceptable solution, but doing it for more than 20 tables seems the wrong way to go.



Does someone have an idea ?



Note that the account I'm using is an Administrator with all security rights, both on SQL server and Dynamics server. I'm using SQL Server 13.0.5026.0 (2016 SP2)



Thank you for your help.



Best

Danny


Category:
STATUS DETAILS
New