Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

Microsoft(SQL Server Native 10.0)(SQL Server)(Violation of Primary Key constraint PKRM00401. Cannot insert duplicate object 'dbo.RM00401

Posted on by 240

I have a client who got the RM batch posting interrupted while working remotely.  The error message comes up as follows "Microsoft(SQL Server Native 10.0)(SQL Server)(Violation of Primary Key constraint PKRM00401. Cannot insert duplicate object 'dbo.RM00401. The duplicate key value is 9, 055010).  I found the 96,000 line duplication in the RM00401 table, but the column name where they're at is "(No Column Name)".  How do I delete these duplicates to get her batch recovered and unstuck please?

The stored procedure rmCLTransactionLogicalTableGrp returned the following results: DBMS: 2627, Microsoft Dynamics GP: 0.  - Error message when running CheckLinks.

Thank you for assistance in advance!

*This post is locked for comments

  • Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: Microsoft(SQL Server Native 10.0)(SQL Server)(Violation of Primary Key constraint PKRM00401. Cannot insert duplicate object 'dbo.RM00401

    Before you go there and just delete the value of 55010 from the table, you need to know the column name - that is important

  • GuruDofGP Profile Picture
    GuruDofGP 240 on at
    RE: Microsoft(SQL Server Native 10.0)(SQL Server)(Violation of Primary Key constraint PKRM00401. Cannot insert duplicate object 'dbo.RM00401

    I ran the CheckLinks a second time after the truncate of table RM00401 because the other cash receipts that were in this same posting interrupted batch did not rebuild in to the table.  After I ran the CheckLinks the second time, they did rebuild back in, except for this duplicate 55010.

    I'll try to pull up the whole RM00401 table with column headers to see if it will give me which column this is supposed to be.

    Can't I script "Delete 55010 from RM00401" and this will remove all of these 96,000+ primary key duplicates from whatever column this is (since it has "No Column Name"), then check for the stuck batch status, and release the batch from where it's found(i.e. SY00800, SY00801, ACTIVITY, etc.)?

    Thank you

  • GuruDofGP Profile Picture
    GuruDofGP 240 on at
    RE: Microsoft(SQL Server Native 10.0)(SQL Server)(Violation of Primary Key constraint PKRM00401. Cannot insert duplicate object 'dbo.RM00401

    I did follow your recommendation, Sat.  The queries returned no results for the other two tables RM10301 and RM20101.  Thank you

  • Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: Microsoft(SQL Server Native 10.0)(SQL Server)(Violation of Primary Key constraint PKRM00401. Cannot insert duplicate object 'dbo.RM00401

    After you did the Truncate - did you happen to look at the content of the table - it should be blank.

    Why did you run the Checklinks twice - just wondering?

    Can you send a screen shot of the header for the RM00401 as when I look at my header, I do not have a 'No Column Name'   - in your query - rather than asking for a value in the select statement, as for the value 055010 in a specific column name in the table.

    select * from RM00401 where (table column name) = '055010'

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Microsoft(SQL Server Native 10.0)(SQL Server)(Violation of Primary Key constraint PKRM00401. Cannot insert duplicate object 'dbo.RM00401

    I hope you followed what I have recommended.

  • GuruDofGP Profile Picture
    GuruDofGP 240 on at
    RE: Microsoft(SQL Server Native 10.0)(SQL Server)(Violation of Primary Key constraint PKRM00401. Cannot insert duplicate object 'dbo.RM00401

    SQL-dup-key-value.png

    SQL-dup-key-value.png

    rmCLT_5F00_DBMS-2627.png

  • Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: Microsoft(SQL Server Native 10.0)(SQL Server)(Violation of Primary Key constraint PKRM00401. Cannot insert duplicate object 'dbo.RM00401

    Can you post a screen shot of the 96,000 of 055010 No Name Column.  Try to get the column names and some of the data - do not need all of it of course, but a few lines before the duplicate starts would be good.

    I am interested to know what is on the record line with that information.

    To paste picture, use the Rich Formatting and then the Insert Media - one to the right of the CHAIN icon on the menu bar.

  • GuruDofGP Profile Picture
    GuruDofGP 240 on at
    RE: Microsoft(SQL Server Native 10.0)(SQL Server)(Violation of Primary Key constraint PKRM00401. Cannot insert duplicate object 'dbo.RM00401

    I ran the truncate table, and the CheckLinks twice, tried to recover the batch again, and tried to post the batch again.  Still not didn't work.  The cash receipts batch is still there stuck with "Posting Interrupted" on the batch recovery window, and the duplicate key lines in the amount of 96,000 of 055010 are still in the "No Name Column."  Please help as soon as possible as this client needs to close out September now when the batch was initially entered.

    Thank you in advance for all your assistance!

  • Bill Campbell Profile Picture
    Bill Campbell 22,647 on at
    RE: Microsoft(SQL Server Native 10.0)(SQL Server)(Violation of Primary Key constraint PKRM00401. Cannot insert duplicate object 'dbo.RM00401

    Guru, when you do the table truncate all the content of the table is removed.

    WHne you complete the checklinks and after you review the 1,000's of lines that will be presented in error message - you should then look for the 9,600 duplicates - if they are there - post again.

    Keep backup - keep safe practice and continue to post updates.

  • GuruDofGP Profile Picture
    GuruDofGP 240 on at
    RE: Microsoft(SQL Server Native 10.0)(SQL Server)(Violation of Primary Key constraint PKRM00401. Cannot insert duplicate object 'dbo.RM00401

    Thank you for the link to truncate the RM00401 table, Bill!  That definitely helps!  

    Do you know how I remove the 96000 duplicates in the "No Column Name" before truncating the table and running the CheckLinks again?

    Thank you in advance!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,188 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans