Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/Error resolution

M-Files Admin: Replication fails with primary key error

Last updated on 10 April 2025 · 1 min read

Admin
M-Files Admin

Overview

Importing all structure elements to empty vault might fail with PRIMARY KEY constraint 'PK_ITEMTX' error. Following kind of error is seen in M-Files Admin:

The package may have been partly imported before the process was stopped.

Import of the object "196-3 ({7FD3F76E-569C-436B-B998-58BD586F8741})" from a content package failed.

The statement has been terminated. (ERROR: 3621, SQLSTATE: 01000)

Violation of PRIMARY KEY constraint 'PK_ITEMT165'. Cannot insert duplicate key in object 'dbo.ITEMT165'. The duplicate key value is (1). (ERROR: 2627, SQLSTATE: 23000)

Solution

This is related to known issue, ADI-283. When it is fixed, it can be found from our release notes.

There is workaround available, needed steps to get structure import to work:

1. Source vault: export first only the value lists + select 'Export contents of the selected value lists'.

2. Import package created in step 1 to target vault.

3. Source vault: create new replication package and now export all the structure elements. 

4. Import package created in step 3 to target vault.

Still need help?

On this page