Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Payroll - violation of PRIMARY KEY constraint in temp table

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

We're getting the infamous PRIMARY KEY violation error on a temp table when running the period-end payroll benefit summary report (Reports-->Payroll-->Period-End-->Benefit Summary).

 

So far I've ran check links on payroll (no errors found),  rebuilt indexes for UPR00100, UPR00600, and UPR30300 (tables being referenced in uprLoadTempXCmpyBenefitSummary), and rebooted the server.  I've also peeked in the UPR tables above looking for a possible duplicate but did not find anything obvious, corrupt, or blank.

I was able to run sp_help and sp_helpconstraint on the temp table so I know what the PK is.  I just can't figure out the duplicate or corrupt record(s).  How can I get the complete GP error that is being cut off in the msg box to get the duplicate key value violation?

Many thanks.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Payroll - violation of PRIMARY KEY constraint in temp table

    Hi Sanjay, thanks for your help but clearing the temp tables did not resolve the issue.  Any other suggestions?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Payroll - violation of PRIMARY KEY constraint in temp table

    Get all  users off the GP clear your temp files  and check if that helps...

    DELETE DYNAMICS..ACTIVITY

    DELETE DYNAMICS..SY00800

    DELETE DYNAMICS..SY00801

    DELETE TEMPDB..DEX_LOCK

    DELETE TEMPDB..DEX_SESSION

    Cheers!

    Sanjay

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans