Analytical Accounting Error: Cannot insert duplicate key in object ‘dbo.AAGXXXXXX’.


Few days ago I got a case with one of my clients complaining that he’s getting the following error when trying to save new Analytical Accounting Transaction Dimension :

[Microsoft][SQL Native Client][SQL Server] Violation of PRIMARY KEY constraint ‘PK_AAG00600’. Cannot insert duplicate key in object ‘dbo.AAG00600’.


While investigating the issue I found that the table “Dynamics.AAG00102” that holds the next values for Tree’s has incorrect index, so I just pulled the maximum ID in AAG00600 table, and then went to Dynamics.AAG00102 located “600” under aaTableID and changed the aaRowID to the maximum number + 1 of the values in AAG00600.

If you don’t link to modify this manually, this was already solved in KB under the following link, there is a script file that will reset all counters for Analytical Accounting and fix this issue out:


Mohammad R. Daoud
Software Development Manager
+962 – 79 – 999 65 85
Great Package For Business Solutions


About Mohammad R. Daoud
Mohammad R. Daoud has been working as a Microsoft Dynamics GP consultant since 2004. His career path started with version 7.5; he studied every single tip of the application technicalities and did allot of successful implementations that includes functional consultations, analysis, and custom development projects. He holds a graduate degree in Computer Science and currently he is pursuing MBA degree in Accounting. In January 2007 he was nominated to the Microsoft Most Valuable Professional (MVP) certificate and was certified in April 2008 due to his online contributions in the Dynamics Community (Dynamics GP Newsgroups, Forums, User Groups and his blog: Worth to mention that he was also listed as one of the Microsoft Dynamics Top 100 Most Influential People in 2009 by DynamicsWorld. And more... • Demonstrated Passion for MS Products through participating in beta testing for some product versions, an effective member of Microsoft Connect. • Talented in securing strong high quality relationships with premier customers, partners and sales teams passionately and profitably. • Dedicated to meeting the expectations and requirements of internal and/or external customers • Problem Solver – Uses systematic approach to uncover true problem(s) and practical solution and can marshal resources to solve problem! • Proven record of effective account management, including Account Planning, Opportunity Management, and Business Management Excellence and working as part of a larger virtual team • Successful in delivering high quality technical engagements in the enterprise Dynamics GP implementations area according to customer requirements. • Dedicated, Committed, Self Motivated, Creative and highly focused with excellent communication, Negotiation, presentation, Active Listening and Objection Handling skills. • Experienced in Profitable researches and studies including white papers and technical presentations.

2 Responses to Analytical Accounting Error: Cannot insert duplicate key in object ‘dbo.AAGXXXXXX’.

  1. rlabey says:

    Thanks for information as an accountant i know how informations are helpful thanks again
    Accounting For Business

  2. it’s good to see this information in your post, i was looking the same but there was not any proper resource, thanx now i have the link which i was looking for my research.

    Accounting Dissertation Proposal

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: