Hello -
We've noticed a couple of errors recently, while upgrading to later versions of Microsoft Dynamics GP such as Microsoft Dynamics GP 2015 R2, Microsoft Dynamics GP 2015 and Microsoft Dynamics GP 2013 R2 and therefore wanted to get some information out to you, in order to allow you to be pro-active in fixing these issues before you attempt the upgrade process.
>>The first error we've seen is the following:
Error Explanation:
Utilities cannot resolve this error. This number represents a native SQL error number.Microsoft Dynamics GP Utilities cannot resolve this error.
Additional Information:
[Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'SEQNUMBR', table 'XXX.dbo.UPR00111'; column does not allow nulls. INSERT fails.
Normally, this error is caused by having an employee ID record (EMPID_I) existing in the HRPBEN02 company table, that doesn't have a corresponding record in the UPR00111 table. Because of this, a NULL value is returned, which causes this error message.
To check for these inconsistencies, you can run the following script:
/*Check for BSSBEN02 inconsistencies*/
SELECT HRPBEN02.DEX_ROW_ID AS [HRPBEN02 DEXROWID],
UPR00111.DEX_ROW_ID AS [UPR00111 DEXROWID],
HRPBEN02.EMPID_I,
HRPBEN02.BENEFIT,
UPR00111.SEQNUMBR,
HRPBEN02.PRIMARY_I,
HRPBEN02.BENEFICIARYPERCENT_I,
Isnull(APR_HRPBEN02.Status, 0) AS Status,
Isnull(APR_HRPBEN02.STSDESCR, '') AS STSDESCR,
Isnull(APR_HRPBEN02.APR_Status_Change_Date, '1900-01-01') AS APR_Status_Change_Date
FROM HRPBEN02
LEFT OUTER JOIN APR_HRPBEN02
ON HRPBEN02.EMPID_I = APR_HRPBEN02.EMPLOYID
AND HRPBEN02.BENEFIT = APR_HRPBEN02.BENEFIT
AND HRPBEN02.IINDEX_I = APR_HRPBEN02.IINDEX_I
LEFT OUTER JOIN UPR00111
ON HRPBEN02.EMPID_I = UPR00111.EMPLOYID
AND HRPBEN02.RELATIONSHIP = UPR00111.RELATIONSHIP
AND HRPBEN02.FFIRSTNAME_I = UPR00111.FRSTNAME
AND HRPBEN02.MI_I = UPR00111.MIDDLEINITIAL
AND HRPBEN02.LLASTNAME_I = UPR00111.LASTNAME
AND HRPBEN02.DEPSSN_I = UPR00111.DEPENDENTSSN
AND HRPBEN02.DATEOFBIRTH_I = UPR00111.BRTHDATE
This SELECT statement is actually part of an INSERT statement that is running during the upgrade. All the records 'selected' by this statement are then attempted to be inserted into the new BSSBEN02 table. If there are any problem records, you'll see the Dex_Row_ID value of the invalid record(s). Usually, the EMPID_I column, at the top of the script results, will be empty or invalid.
When the invalid records are found, they then need to be deleted from the HRPBEN02 table.
>>The second upgrade error we've seen is this:
if exists (select name from sysobjects where name = 'HRPBEN02' and type = 'U') begin INSERT INTO [dbo].[APR_BSSBEN02] ([EMPID_I] ,[BENEFIT] ,[SEQNUMBR] ,[PRIMARY_I] ,[BENEFICIARYPERCENT_I] ,[Status] ,[STSDESCR] ,[APR_Status_Change_Date]) ( select HRPBEN02.EMPID_I, HRPBEN02.BENEFIT, UPR00111.SEQNUMBR, HRPBEN02.PRIMARY_I, HRPBEN02.BENEFICIARYPERCENT_I, ISNULL(APR_HRPBEN02.Status, 0) as Status, ISNULL(APR_HRPBEN02.STSDESCR, '') as STSDESCR, ISNULL(APR_HRPBEN02.APR_Status_Change_Date, '1900-01-01') as APR_Status_Change_Date from HRPBEN02 left outer join APR_HRPBEN02 on HRPBEN02.EMPID_I = APR_HRPBEN02.EMPLOYID and HRPBEN02.BENEFIT = APR_HRPBEN02.BENEFIT and HRPBEN02.IINDEX_I = APR_HRPBEN02.IINDEX_I left outer join UPR00111 on HRPBEN02.EMPID_I = UPR00111.EMPLOYID and HRPBEN02.RELATIONSHIP = UPR00111.RELATIONSHIP and HRPBEN02.FFIRSTNAME_I = UPR00111.FRSTNAME and HRPBEN02.MI_I = UPR00111.MIDDLEINITIAL and HRPBEN02.LLASTNAME_I = UPR00111.LASTNAME and HRPBEN02.DEPSSN_I = UPR00111.DEPENDENTSSN and HRPBEN02.DATEOFBIRTH_I = UPR00111.BRTHDATE) end
/*
/* Date: 09/09/2015 Time: 14:43:57
SQLSTATE:(23000) Native Err:(2627) stmt(140445568):*/
[Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of PRIMARY KEY constraint 'PKAPR_BSSBEN02'. Cannot insert duplicate key in object 'dbo.APR_BSSBEN02'. The duplicate key value is (5928 , LIFEAD , 37732352).*/
This is the error we get when a person(s) is listed in the HRPBEN02 table as both the primary and secondary beneficiary for the same benefit, for the same employee ID, which Utilities doesn’t allow.
If we run this script, it helps find the duplicate records, which we then normally just have to remove the records for the secondary beneficiary, i.e. PRIMARY_I value is 0 (zero) meaning secondary whereas 1 means it is the primary beneficiary, from the HRPBEN02 table as well.
select EMPID_I, BENEFIT, RELATIONSHIP,FFIRSTNAME_I, MI_I, LLASTNAME_I, DEPSSN_I, DATEOFBIRTH_I from HRPBEN02
group by EMPID_I, BENEFIT, RELATIONSHIP,FFIRSTNAME_I, MI_I, LLASTNAME_I, DEPSSN_I, DATEOFBIRTH_I
Having COUNT(*) > 1
>>The third upgrade error that we've seen is when using Analytical Accounting for Microsoft Dynamics GP, if you have a Dimension Description named 'Asset ID', the upgrade will fail since the new list has a column already named 'Asset ID'.
When we run into this issue, we've found that we can work around it by changing the Dimension Description to have no spaces in it, such as using this script:
UPDATE AAG00400 SET aaTrxDimDescr = 'AssetID' WHERE aaTrxDimDescr = ‘Asset ID’
You also cannot have any duplicate descriptions in this aaTrxDimDescr column, in the AAG00400 table, for different records, otherwise this table will fail the upgrade as well.
If you run into any of these errors during an actual upgrade of Microsoft Dynamics GP, once you resolve the data issues causing the error to occur, remember to run the following script before launching Dynamics GP Utilities again and continuing with the upgrade:
Delete DYNAMICS..DU000030 where Status <> 0 and Status <> 15
Here are a few additional links to blogs regarding Upgrade Issues to Microsoft Dynamics GP 2015:
Microsoft Dynamics GP 2015 R2 - Known Upgrade Issues
Conversion failed when converting the varchar value 'XXXXX' to data type int.
If we encounter any additional Upgrade issues, we'll add to this blog so that we can keep all of the information in one place, making it easier to find and resource, especially with the year-end and tax updates coming around the corner for Microsoft Dynamics GP.
Good Luck with your upgrading!!!!!