web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

GP upgrade error removing temporary tables.

(0) ShareShare
ReportReport
Posted on by 2,611

i have this error for all companies ( Remove the temporary table at the database level ).

i am upgrading from GP 16.00.0404.

4667.png

alshall1.png

Categories:
I have the same question (0)
  • Verified answer
    Derek Albaugh Profile Picture
    on at

    To get the information we would need to troubleshoot, I'd have you give me this information, if this were an support case:

    A. Run the following scripts against your DYNAMICS/system database for GP:

    Delete DU000030 where Status <> 0 and Status <> 15


    B. Start a dexsql.log file for Dynamics GP 2016 and delete any prior dexsql.log files that may already exist:

    KB article 850996 - How to create a Dexsql.log file for Microsoft Dynamics GP and Great Plains
    support.microsoft.com/.../how-to-create-a-dexsql-log-file-to-troubleshoot-error-messages-in-micr

    C. Launch Dynamics GP 2016 utilities and continue the upgrade of this failing company database.


    If the upgrade fails again on this or any other errors, please send me the dexsql.log file created and then the results of the following scripts:

    1. Select CMPANYID,CMPNYNAM,INTERID from SY01500

    2. Select * from DB_Upgrade

    3. Select * from DU000020 order by companyID

    4. SELECT b.fileOSName, a.fileNumber, a.PRODID, a.Status, a.errornum, a.errordes, c.CMPANYID, c.INTERID FROM DU000030 a JOIN DU000010 b ON a.fileNumber = b.fileNumber AND a.PRODID = b.PRODID JOIN SY01500 c ON a.companyID = c.CMPANYID WHERE (a.Status <> 0 or a.errornum <> 0) and a.Status <>15

    Using the 'failed tables' script (#4) and the dexsql.log looking specifically for the SY40800 table, it'll give us the information we would need to troubleshoot the failing table.

    The SY40800 table has existed for many versions of GP, as it holds information for SQL SRS reports deployed and such. I believe this table gets updated to include other columns.

    As well, the message about 'temporary tables' is misleading, as the upgrade process will roll back all changes to any failing table automatically, because of this, it is rare that we have to manually remove temp objects or lose data.

    Thank you

  • Hossam Fathy Profile Picture
    2,611 on at

    Hello Derek,

    Thank for reply.

    Please check attached files.

    View:/cfs-file/__key/communityserver-discussions-components-files/32/DEXSQL.LOGQuery-Results.xlsx

  • Derek Albaugh Profile Picture
    on at

    Usually when we see so many tables failing for one company, across all different table types (POP, PM, RM, etc), the recommendation is to restore back to the previous version, then truncate the DU000030 table completely, and then restart the upgrade again to see if this resolves the table errors.

    If you've upgraded most company databases and this is the last one or close to it, you can use KB 920900 to restart the upgrade of only this one company database, which appears to be SHALL (1).

    Thanks

  • Hossam Fathy Profile Picture
    2,611 on at

    Hello Derek,

    I fixed the issue.

    I noticed that after i install the SP i still have the same GP build version number, i installed 3 different SP and the GP Build version number still the same so i make new fresh GP installation then installed the SP and my upgrade working now without any errors.

    Just a question, what is the reason that the SP not updated my GP installation?

    if i got any new errors sure i will contact you

    Thank you for your time.

  • Verified answer
    Derek Albaugh Profile Picture
    on at

    Sometimes the dictionary files get damaged so they don't take the new version update. A new install of GP, like you did, usually will resolve that. Thanks

  • Hossam Fathy Profile Picture
    2,611 on at

    Hello Derek,

    I got below error for one company.

    The following SQL statement produced an error:

    create procedure dbo.glpPostBudgetTransaction  @I_iSQLSessionID int   = NULL,  @I_iJournalEntry int   = NULL,   @I_cUserID char(15) = NULL,   @I_tPrinting tinyint  = NULL,   @I_tPosting tinyint  = NULL,   @I_bBatchValid binary(4) = NULL,  @IO_bHeaderMessages binary(4) = NULL output,  @O_bLineMessages binary(4) = NULL output,  @O_bLineMessages2 binary(4) = NULL output,   @O_mSequenceLine numeric(19,5)= NULL output,  @O_iErrorState int   = NULL output as  declare  @TRUE tinyint,  @FALSE tinyint,  @BUDGET_TRX smallint,   @iError int,  @tLoop tinyint,  @tTransaction tinyint,  @iStatus int,  @strJournalNumber varchar(30),  @cHdrAuditTrailCode char(13),  @MXNUMSEG int,  @MaintainBudgetHist int  select  @O_mSequenceLine = 0.0,  @O_iErrorState = 0,  @iStatus = 0,  @O_bLineMessages = 0x00000000,  @O_bLineMessages2 = 0x00000000  if @@trancount = 0 begin  select @tTransaction = 1  begin transaction end   while (@tLoop is NULL) begin  select @tLoop = 1   if @I_iSQLSessionID is NULL or  @I_iJournalEntry is NULL or   @I_cUserID is NULL or  @I_tPrinting is NULL or  @I_tPosting is NULL or  @I_bBatchValid is NULL or  @IO_bHeaderMessages is NULL  begin  select @O_iErrorState = 21118  break  end    select  @TRUE    = 1,  @FALSE    = 0,  @BUDGET_TRX   = 4   select   @cHdrAuditTrailCode  = TRXSource  from  #TRXHeader  where  JournalEntry = @I_iJournalEntry   if @@rowcount <> 1  begin  select @O_iErrorState = 20891  break  end   if @I_tPosting = @TRUE  begin   UPDATE GL00201   set GL00201.BUDGETAMT = GL00201.BUDGETAMT + COALESCE(GL12001.BudgerAdjustment,0)  FROM GL00201   INNER JOIN GL12001 ON  GL00201.BUDGETID = GL12001.BUDGETID   and GL00201.ACTINDX  = GL12001.ACTINDX   and GL00201.PERIODDT = GL12001.PERIODDT   and GL00201.PERIODID = GL12001.PERIODID   WHERE JRNENTRY = @I_iJournalEntry    select @iError = @@error  if @iError <> 0   begin  select @O_iErrorState = 21119  select @iStatus = @iError  break  end   select @MXNUMSEG = max(MXNUMSEG) from  DYNAMICS..SY003001  select @strJournalNumber = rtrim(ltrim(str(@I_iJournalEntry)));   if @MXNUMSEG = 1   exec ('INSERT INTO GL00201   SELECT bt.BUDGETID, a.ACTNUMBR_1,   bt.PERIODDT, bt.PERIODID, bt.BudgerAdjustment, a.ACCATNUM, a.ACTINDX, bt.YEAR1, getutcdate()   FROM GL12001 AS bt   INNER JOIN GL00100 AS a  ON bt.ACTINDX = a.ACTINDX   LEFT OUTER JOIN GL00201 AS bm ON bm.BUDGETID = bt.BUDGETID  and bm.ACTINDX = bt.ACTINDX   and bm.PERIODDT = bt.PERIODDT   and bm.PERIODID = bt.PERIODID   WHERE JRNENTRY = ' +  @strJournalNumber  + ' and bm.BUDGETID is NULL')  else if @MXNUMSEG = 2   exec ('INSERT INTO GL00201   SELECT bt.BUDGETID, a.ACTNUMBR_1, a.ACTNUMBR_2,   bt.PERIODDT, bt.PERIODID, bt.BudgerAdjustment, a.ACCATNUM, a.ACTINDX, bt.YEAR1, getutcdate()   FROM GL12001 AS bt   INNER JOIN GL00100 AS a  ON bt.ACTINDX = a.ACTINDX   LEFT OUTER JOIN GL00201 AS bm ON bm.BUDGETID = bt.BUDGETID  and bm.ACTINDX = bt.ACTINDX   and bm.PERIODDT = bt.PERIODDT   and bm.PERIODID = bt.PERIODID   WHERE JRNENTRY = ' +  @strJournalNumber  + ' and bm.BUDGETID is NULL')  else if @MXNUMSEG = 3   exec ('INSERT INTO GL00201   SELECT bt.BUDGETID, a.ACTNUMBR_1, a.ACTNUMBR_2, a.ACTNUMBR_3,   bt.PERIODDT, bt.PERIODID, bt.BudgerAdjustment, a.ACCATNUM, a.ACTINDX, bt.YEAR1, getutcdate()   FROM GL12001 AS bt   INNER JOIN GL00100 AS a  ON bt.ACTINDX = a.ACTINDX   LEFT OUTER JOIN GL00201 AS bm ON bm.BUDGETID = bt.BUDGETID  and bm.ACTINDX = bt.ACTINDX   and bm.PERIODDT = bt.PERIODDT   and bm.PERIODID = bt.PERIODID   WHERE JRNENTRY = ' +  @strJournalNumber  + ' and bm.BUDGETID is NULL')  else if @MXNUMSEG = 4   exec ('INSERT INTO GL00201   SELECT bt.BUDGETID, a.ACTNUMBR_1, a.ACTNUMBR_2, a.ACTNUMBR_3, a.ACTNUMBR_4,   bt.PERIODDT, bt.PERIODID, bt.BudgerAdjustment, a.ACCATNUM, a.ACTINDX, bt.YEAR1, getutcdate()   FROM GL12001 AS bt   INNER JOIN GL00100 AS a  ON bt.ACTINDX = a.ACTINDX   LEFT OUTER JOIN GL00201 AS bm ON bm.BUDGETID = bt.BUDGETID  and bm.ACTINDX = bt.ACTINDX   and bm.PERIODDT = bt.PERIODDT   and bm.PERIODID = bt.PERIODID   WHERE JRNENTRY = ' +  @strJournalNumber  + ' and bm.BUDGETID is NULL')  else if @MXNUMSEG = 5   exec ('INSERT INTO GL00201   SELECT bt.BUDGETID, a.ACTNUMBR_1, a.ACTNUMBR_2, a.ACTNUMBR_3, a.ACTNUMBR_4, a.ACTNUMBR_5,   bt.PERIODDT, bt.PERIODID, bt.BudgerAdjustment, a.ACCATNUM, a.ACTINDX, bt.YEAR1, getutcdate()   FROM GL12001 AS bt   INNER JOIN GL00100 AS a  ON bt.ACTINDX = a.ACTINDX   LEFT OUTER JOIN GL00201 AS bm ON bm.BUDGETID = bt.BUDGETID  and bm.ACTINDX = bt.ACTINDX   and bm.PERIODDT = bt.PERIODDT   and bm.PERIODID = bt.PERIODID   WHERE JRNENTRY = ' +  @strJournalNumber  + ' and bm.BUDGETID is NULL')  else if @MXNUMSEG = 6   exec ('INSERT INTO GL00201   SELECT bt.BUDGETID, a.ACTNUMBR_1, a.ACTNUMBR_2, a.ACTNUMBR_3, a.ACTNUMBR_4, a.ACTNUMBR_5, a.ACTNUMBR_6,   bt.PERIODDT, bt.PERIODID, bt.BudgerAdjustment, a.ACCATNUM, a.ACTINDX, bt.YEAR1, getutcdate()   FROM GL12001 AS bt   INNER JOIN GL00100 AS a  ON bt.ACTINDX = a.ACTINDX   LEFT OUTER JOIN GL00201 AS bm ON bm.BUDGETID = bt.BUDGETID  and bm.ACTINDX = bt.ACTINDX   and bm.PERIODDT = bt.PERIODDT   and bm.PERIODID = bt.PERIODID   WHERE JRNENTRY = ' +  @strJournalNumber  + ' and bm.BUDGETID is NULL')  else if @MXNUMSEG = 7   exec ('INSERT INTO GL00201   SELECT bt.BUDGETID, a.ACTNUMBR_1, a.ACTNUMBR_2, a.ACTNUMBR_3, a.ACTNUMBR_4, a.ACTNUMBR_5, a.ACTNUMBR_6, a.ACTNUMBR_7,   bt.PERIODDT, bt.PERIODID, bt.BudgerAdjustment, a.ACCATNUM, a.ACTINDX, bt.YEAR1, getutcdate()   FROM GL12001 AS bt   INNER JOIN GL00100 AS a  ON bt.ACTINDX = a.ACTINDX   LEFT OUTER JOIN GL00201 AS bm ON bm.BUDGETID = bt.BUDGETID  and bm.ACTINDX = bt.ACTINDX   and bm.PERIODDT = bt.PERIODDT   and bm.PERIODID = bt.PERIODID   WHERE JRNENTRY = ' +  @strJournalNumber  + ' and bm.BUDGETID is NULL')  else if @MXNUMSEG = 8   exec ('INSERT INTO GL00201   SELECT bt.BUDGETID, a.ACTNUMBR_1, a.ACTNUMBR_2, a.ACTNUMBR_3, a.ACTNUMBR_4, a.ACTNUMBR_5, a.ACTNUMBR_6, a.ACTNUMBR_7, a.ACTNUMBR_8,   bt.PERIODDT, bt.PERIODID, bt.BudgerAdjustment, a.ACCATNUM, a.ACTINDX, bt.YEAR1, getutcdate()   FROM GL12001 AS bt   INNER JOIN GL00100 AS a  ON bt.ACTINDX = a.ACTINDX   LEFT OUTER JOIN GL00201 AS bm ON bm.BUDGETID = bt.BUDGETID  and bm.ACTINDX = bt.ACTINDX   and bm.PERIODDT = bt.PERIODDT   and bm.PERIODID = bt.PERIODID   WHERE JRNENTRY = ' +  @strJournalNumber  + ' and bm.BUDGETID is NULL')  else if @MXNUMSEG = 9   exec ('INSERT INTO GL00201   SELECT bt.BUDGETID, a.ACTNUMBR_1, a.ACTNUMBR_2, a.ACTNUMBR_3, a.ACTNUMBR_4, a.ACTNUMBR_5, a.ACTNUMBR_6, a.ACTNUMBR_7, a.ACTNUMBR_8, a.ACTNUMBR_9,  bt.PERIODDT, bt.PERIODID, bt.BudgerAdjustment, a.ACCATNUM, a.ACTINDX, bt.YEAR1, getutcdate()   FROM GL12001 AS bt   INNER JOIN GL00100 AS a  ON bt.ACTINDX = a.ACTINDX   LEFT OUTER JOIN GL00201 AS bm ON bm.BUDGETID = bt.BUDGETID  and bm.ACTINDX = bt.ACTINDX   and bm.PERIODDT = bt.PERIODDT   and bm.PERIODID = bt.PERIODID   WHERE JRNENTRY = ' +  @strJournalNumber  + ' and bm.BUDGETID is NULL')  else if @MXNUMSEG = 10   exec ('INSERT INTO GL00201   SELECT bt.BUDGETID, a.ACTNUMBR_1, a.ACTNUMBR_2, a.ACTNUMBR_3, a.ACTNUMBR_4, a.ACTNUMBR_5, a.ACTNUMBR_6, a.ACTNUMBR_7, a.ACTNUMBR_8, a.ACTNUMBR_9, a.ACTNUMBR_10,   bt.PERIODDT, bt.PERIODID, bt.BudgerAdjustment, a.ACCATNUM, a.ACTINDX, bt.YEAR1, getutcdate()   FROM GL12001 AS bt   INNER JOIN GL00100 AS a  ON bt.ACTINDX = a.ACTINDX   LEFT OUTER JOIN GL00201 AS bm ON bm.BUDGETID = bt.BUDGETID  and bm.ACTINDX = bt.ACTINDX   and bm.PERIODDT = bt.PERIODDT   and bm.PERIODID = bt.PERIODID   WHERE JRNENTRY = ' +  @strJournalNumber  + ' and bm.BUDGETID is NULL')  else  begin  select @iStatus = 21120  select @O_iErrorState = 21120  break  end   select @iError = @@error  if @iError <> 0   begin  select @iStatus = @iError  select @O_iErrorState = 21120  break  end      INSERT INTO XLActInf  select BLAH.FX, BLAH.AX from   (select DISTINCT xlf.FILEIDX as FX, bt.ACTINDX as AX  from GL12001 as bt   INNER JOIN GL00100 AS a  ON bt.ACTINDX = a.ACTINDX  left outer join XLFileIn as xlf on rtrim(xlf.BUDGETID) = RTRIM(bt.BUDGETID )   left outer join XLActInf as xla on xla.FILEIDX = xlf.FILEIDX and xla.ACTINDX = bt.ACTINDX  WHERE bt.JRNENTRY = @I_iJournalEntry and xla.ACTINDX is NULL) BLAH where BLAH.FX IS NOT NULL   select @iError = @@error  if @iError <> 0   begin  select @iStatus = @iError  select @O_iErrorState = 21121  break  end    insert into GL32000 (h.JRNENTRY, h.BUDGETID,YEAR1, PERIODDT, PERIODID, ACTINDX, BUDGETAMT, BudgerAdjustment, REFRENCE, TRXDATE, USWHPSTD, NOTEINDX, TRXSORCE, SOURCDOC )  select h.JRNENTRY, h.BUDGETID,YEAR1, PERIODDT, PERIODID, ACTINDX, BUDGETAMT, BudgerAdjustment, REFRENCE, TRXDATE, @I_cUserID, NOTEINDX, @cHdrAuditTrailCode, SOURCDOC   from GL12000 as h  inner join GL12001 as l  on l.JRNENTRY = h.JRNENTRY  WHERE h.JRNENTRY = @I_iJournalEntry   select @iError = @@error  if @iError <> 0   begin  select @O_iErrorState = 21122  select @iStatus = @iError  break  end   UPDATE GL12000   set TRXSORCE =  @cHdrAuditTrailCode,   USWHPSTD = @I_cUserID  WHERE GL12000.JRNENTRY = @I_iJournalEntry   end  end   if @iStatus <> 0 or @O_iErrorState <> 0 begin  if @tTransaction = 1  rollback transaction end else if @tTransaction = 1  commit transaction  return (@iStatus)  

    ERROR [Microsoft][SQL Server Native Client 11.0][SQL Server]Column name or number of supplied values does not match table definition.

  • Verified answer
    Derek Albaugh Profile Picture
    on at

    Oddly, usually when I've run into this exact error, it is the XLFileIn and XLActInf tables that are not setup correctly. Specifically, they don't have DEX_ROW_ID setup as an identity column, thus it fails because there isn't any value setup per the above script to be inserted into that column, because we don't insert anything into DEX_ROW_ID.

    Dropping these two tables and re-creating them after making backups, and putting data back into them, if any, is usually how we resolve.

    If you run sp_help script against these two tables, it'll show you under the list of columns whether DEX_ROW_ID is setup as identity column or not.

    Thanks

  • Hossam Fathy Profile Picture
    2,611 on at

    There is no data in these tables

  • Hossam Fathy Profile Picture
    2,611 on at

    Hello,

    XLActInf the table makes the issues, it is blank but there is one column more than other database.

    Issue fixed.

    Thank you.

  • Suggested answer
    Derek Albaugh Profile Picture
    on at

    Good to hear it. Thanks

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans