Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Error message when you try to perform the year-end closing routine in General Ledger in Microsoft Dynamics GP: "Violation of PRIMARY KEY constraint"


View products that this article applies to.

Symptoms

When you try to perform the year-end closing routine in General Ledger in Microsoft Dynamics GP, you receive the following error message:
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PKGL10110'. Cannot insert duplicate key in object 'GL10110'.

↑ Back to the top


Resolution

To resolve this problem, use the steps below:

  1. Have all users exit Microsoft Dynamics GP.
  2. Restore a backup of the company database that was made before you tried to perform the General Ledger year-end closing routine.
  3. Start SQL Server Management Studio.  To do this, click Start, point to All Programs, point to Microsoft SQL Server 20XX (XX=your version), and then click SQL Server Management Studio.
  4. Run the following scripts against the company database to delete the GL Account Summary tables:
    DELETE GL10110

    DELETE GL10111
  5. Run Check Links on the Financial Series. To do this
    1. On the Microsoft Dynamics GP menu, point to Maintenance, and then click Check Links.
    2. In the Series list, click Financial, and then click All to insert all the Logical Tables to the Selected Tables list.
    3. Click OK.
  6. Run reconcile for all the years in the Year list to rebuild the summary tables. To do this,
      • On the Microsoft Dynamics GP menu, point to Tools, point to Utilities, point to Financial, and then click Reconcile.
      Note Click to select the Year check box and then select the year.
    1. Click to select the Year check box.
    2. Click the History option, and then click the oldest year in the Year list.
    3. Click Reconcile.
    4. Repeat steps c and d for each year that is listed in the Year list. Start with the oldest year, and end with the current year.
  7. Perform the year-end closing routine in General Ledger.

↑ Back to the top


More Information

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

888003 Year-end closing procedures for General Ledger in Microsoft Dynamics GP

↑ Back to the top


Keywords: kbtshoot, kberrmsg, kbmbspartner, kbmbsmigrate, kb

↑ Back to the top

Article Info
Article ID : 856553
Revision : 3
Created on : 10/3/2017
Published on : 10/3/2017
Exists online : False
Views : 227