Violation of PRIMARY KEY constraint 'PK_Dashboard'

Modified on Wed, 05 Feb 2014 12:23 PM by Julius M. — Categorized as: Administration, Errors


The check out failed.

[0] Violation of PRIMARY KEY constraint 'PK_Dashboard'. Cannot insert duplicate key in object 'dbo.Dashboard'. The duplicate key value is (8a159a37-7e87-49de-a3a9-db0315418aa7, 1). The statement has been terminated.


The error appears when trying to checkout a dashboard.


This error occurs when multiple objects of the same dashboard are present in the data store, one in Checked-In state and the other in Checked-Out state.

This may happen in the following scenario:

  1. Dashboard is checked out for editing
  2. A copy of same Dashboard is imported while the dashboard in the same instance is checked out

The imported copy is recognized by Dashboard and is available for check-out. However, you cannot check it out as the checked out Dashboard already exists in the DataStore (but not visible from Dashboard).

The error message means that you are unable to check-out because it already exists in that state.


An easy resolution is to just duplicate your dashboard and work with the duplicate moving forward. However, if for some reason, this is not feasible (like when your original dashboard is integrated somewhere, or when you have a drill-down that navigates to your original dashboard), you can use the options below to clear the check-out flag:

Option 1: Using Manage Project Items:

Since the dashboard table already contains a record for checked out dashboard, this needs to be cleaned. If this is visible through administration area, you can be manage it from there.

Go to Administration-->Manage Project Items.

Check if you can see that the dashboard is checked out in the Project Items listed. If it is checked out (normally), the admin should be able to either undo check out, or check in, or transfer checkout to another user.

Option 2: Clearing the checkout flag manually from the Datastore:

If you are not able to see it in the list, then the checked out dashboard needs to be cleaned and removed manually from the datastore.

Note: Removing the checked out state from the Datastore is irreversible. Before making any changes, you must backup the datastore. Please contact support for details on how to manually clear the record.