Select to view content in your preferred language

Failed Compress - mvtables

1326
2
08-20-2013 08:20 AM
by Anonymous User
Not applicable
Original User: JoeBrowns

SDE version 9.3
SQL Server 2008


DBMS table not found [Microsoft OLE DB Provider for SQL Server: Violation of PRIMARY KEY constraint 'mvtables_modified_pk'. Cannot insert duplicate key in object 'SDE_mvtables_modified'.] [sde.DEFAULT]
Failed to execute (Compress).

Now I know what the PK violation means I'm just wondering how I found out what insert is causing it.
0 Kudos
2 Replies
by Anonymous User
Not applicable
Original User: crafty762

Is it possible for you to restart your MSSQL Server instance on the database server?  We use Oracle, but we've seen similar errors when our DBMS pipes do not use the next correct number for something like object ID.  This can occur if you've truncated a table and re-loaded it from another source.  Restarting Oracle for us allows the pipes to be cleared out.  Perhaps this issue also occurs with SQL Server.  I'm sorry I don't have a better explanation than this, but it may be helpful to you. 

Another thing you can do is to drop the MV view, perform the compress, and then re-create it (you can script this too).
0 Kudos
EmadAl-Mousa
Deactivated User
do the compress again, and then immediately check your ArcSDE logs (the logs will give you clearer indication).

Also, you will need to use sdegdbrepair command to fix the constraint issue.

for reference please check this esri documentation: http://support.esri.com/fr/knowledgebase/techarticles/detail/35298
0 Kudos