When you update to Microsoft Dynamics GP 2010, the table conversion for the company database fails. A red X appears next to the company indicating a failure. To determine what tables failed, run the following script:

SELECT b.fileOSName, a.fileNumber, a.PRODID, a.Status, a.errornum, a.errordes, c.CMPANYID, c.INTERIDFROM DYNAMICS.dbo.DU000030 aJOINDYNAMICS.dbo.DU000010 bON a.fileNumber = b.fileNumberAND a.PRODID = b.PRODIDJOINDYNAMICS.dbo.SY01500 cON a.companyID = c.CMPANYIDWHERE (a.Status <> 0 or a.errornum <> 0) and a.Status <>15

      You receive the following error message in the errordesc column:  

[Microsoft][SQL Server Native Client 10.0][SQL Server]Violation of PRIMARY KEY constraint 'PKUPRXXXXX'. Cannot insert duplicate key in object 'dbo.UPRXXXXXX'.

You receive this error message when one or more of the following tables fail to update:UPR10203 UPR10204 UPR10205 UPR10206 UPR10207 UPR10209 UPR10213 UPR10214

Cause

Note Before you follow the instructions in this article, make sure that you have a complete backup copy of the database that you can restore if a problem occurs.The primary key changed with Microsoft Dynamics GP 2010 and the records in the table are violating the new key. Records should not exist in the payroll work tables following a payroll check run. To fix this problem, remove the records.To have us fix this problem for you, go to the "Fix it for me" section. If you would rather fix this problem yourself, go to the "Let me fix it myself" section.

Symptoms

To fix this problem automatically, click the Fix this problem link. Then click Run in the File Download dialog box, and follow the steps in this wizard.

Note This wizard may be in English only; however, the automatic fix also works for other language versions of Windows.Note If you are not on the computer that has the problem, you can save the automatic fix to a flash drive or to a CD, and then you can run it on the computer that has the problem.

Fix it for me

To fix this problem yourself, follow these steps:

  1. Do not restore the company database. This problem can be resolved at the point of failure during the update to Microsoft Dynamics GP 2010.

  2. Start the SQL Server Management Studio. To do this, use one of the following methods depending on the program that you are using.

    Method 1: For SQL Server 2005 If you are using SQL Server 2005, start SQL Server Management Studio. To do this, click Start, point to All Programs, point to Microsoft SQL Server 2005, and then click SQL Server Management Studio.

    Method 2: For SQL Server 2008If you are using SQL Server 2008, start SQL Server Management Studio. To do this, click Start, point to All Programs, point to Microsoft SQL Server 2008, and then click SQL Server Management Studio.

  3. Run the following scripts against the company database that is failing:

    Delete UPR10203Delete UPR10204Delete UPR10205Delete UPR10206Delete UPR10207Delete UPR10209Delete UPR10213Delete UPR10214
  4. Run the following script to clear the failed records:

    Delete DYNAMICS..DU000030 where Status = 135 and fileNumber in (424, 425, 426, 427, 428, 429, 385, 386)
  5. Start Microsoft Dynamics GP 2010 Utilities and update the company again.

Let me fix it myself

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.