Database error and how to fix it...

Cwood3Cwood3 Moderator Posts: 23 mod

While reviewing the Adept Server Log, I found an error:

04/24/2018 14:13:14 Adept Server has encountered the following error:
The key data supplied returned multiple rows.
The ReadRecord task requires a full and unique primary key.
Table: (FM100REV)
 S_FILEID  :  21a405a6-be9f-4548-9e05-6750d8113364
 S_MINREV  :  0

Hmm, what is going on here?  Keep in mind that there are a lot of things going on behind the scenes when Adept does routine actions.  There is a lot of juggling where the database updates records, and moves records from one table to another.  And as with any juggling act, sometimes something get's dropped.  So in this case, a file had been approved, it got moved around in the vault, it's old record was copied to the revision section of the database, and the new "IN" record was created.  But the ball that got dropped was removing the Old "IN" record, so the system saw that 2 records for the same file with the S_MINREV value of 0.

Great, so we know what the problem is, but how do we resolve it?  Well you can dust off your SQL books and start to dig in to the database, and perform a search, and...  Wait!  There is an easier way!  in Adept on the System Ribbon, in the Maintenance group, select the Miscellaneous drop down, and choose Database Repair.  This will automagically perform an assessment of the different table, detect any problems and report any errors it finds.  You can then repair the problems with a simple click of the Repair button.  It is that easy.


  • [Deleted User][Deleted User] Posts: 33
    Thank you, Chris for sharing this wonderful information. It is a great tool for correcting the primary key errors that sometimes occur. One thing to note is that this tool will only work with Adept 2017 and higher. If you are running 2015 or earlier, then it is best to open a support call. The support team can then walk you through the queries to address the error.
  • xmicahxxmicahx Member Posts: 81 ✭✭
    I have use this tool before to correct these issues. I have one now that the error occurred as it was going to "IN" status from the last workflow step. All appears good, except for the "Active Workflow Step"  and "Active Workflow Step ID" were not cleared on the "IN" version. This isn't a huge issue, but messes up our FileGuide view that uses the "Active Workflow Step." @Gene.Sewell this might be another check/update that needs to occur within the Database repair tool.

  • MLubowMLubow Administrator Posts: 38 admin
    Hi Micah and Happy New Year!

    It appears that the error occurring while the document was being changed to IN status also caused the workflow fields to not get cleared. Clearing them will require some specific database edits that only our development team can advise upon. To resolve this issue, you should contact Helpdesk so they can orchestrate a solution with our DEV team.

    Let me know if this is helpful.



  • xmicahxxmicahx Member Posts: 81 ✭✭
    I have already updated the DB to correct the values. I was just suggesting an improvement to the tool.  :)
  • MLubowMLubow Administrator Posts: 38 admin
    OK. Gotcha. Will pass this along. . .
Sign In or Register to comment.