Package and Deployment error: Cannot insert duplicate key in object 'dbo.@Contexts'.

  • 16 February 2021
  • 0 replies
  • 92 views

Issue

When deploying a package, the post-deployment fails with an error on a view.

Error Code

Violation of UNIQUE KEY constraint 'UQ__#AFB2F7C__0098C95D19302928'. Cannot insert duplicate key in object 'dbo.@Contexts'. The duplicate key value is (V, [GUID], [View name], <NULL>, <NULL>). The data for table-valued parameter "@Contexts" doesn't conform to the table type of the parameter. SQL Server error is: 3602, state: 30 The statement has been terminated.

Resolution

Issue is caused by two artifacts with the same display name, but different system names. One view may have the system name "Customer Invoice Editable List" and one may be "Customer Invoice Editable List_portal_denallix_com_Customer_Invoices", but both show the name "Customer Invoice Editable List"

 

Recreating the package and excluding one of the views should allow the package to deploy successfully. 

 


0 replies

Be the first to reply!

Reply