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 :
Microsoft Dynamics GP (Archived)

Management Reporter DataMart Rebuild

(0) ShareShare
ReportReport
Posted on by 2

Customer is on GP2018 and MR Version 16 and after doing a new install of MR the get the following error in the logs of the DataMart

ERROR TID:TP-11 [2018-09-20T12:56:33.4568466-04:00]: The query processor could not produce a query plan because a worktable is required, and its minimum row size exceeds the maximum allowable of 8060 bytes. A typical reason why a worktable is required is a GROUP BY or ORDER BY clause in the query. If the query has a GROUP BY or ORDER BY clause, consider reducing the number and/or size of the fields in the clause. Consider using prefix (LEFT()) or hash (CHECKSUM()) of fields for grouping or prefix for ordering. Note however that this will change the behavior of the query.

Hoping someone can help

*This post is locked for comments

I have the same question (0)
  • JoshP Profile Picture
    on at

    Hello!

    Thanks for providing the details of the error. This error is a SQL-level error, and is possibly caused by some unexpected data found in Dynamics GP which results in a query which is much larger than expected, as there are several queries that are dynamically created based on the data found in GP. Without more information, it is hard to guess as to a possible cause so I have some questions for you:

    1. Which of the data mart tasks shows this error occurring? For example, is it "General Ledger Transactions to Fact", "Fiscal Years to Fiscal Year", etc.?

    2. Has MR ever worked for this customer with this company?

    3. Is Analytical Accounting (AA) being used by the customer?

    4. Is there any obvious "bad" data, such as a fiscal year outside of an expected range? For example, the year "3000" would not be an expected year.

    5. Is there more than one company? For example, if there is a test company which could have an unexpected setup, try excluding it from the data mart under Setup | Company | Company and uncheck "General Ledger Reporting". Then re-create the data mart. Or try including just one known good company and see if the problem happens.

    6. What is the full version number of the SQL server hosting the GP and MR databases? Please include the version of each if more than one server.

    Thanks!

  • scraig99 Profile Picture
    2 on at

    It is the General Ledger Transactions to Fact - they only have one company - I do not believe they are using AA but tomorrow I will verify along with the SQL version and let you know - I appreciate the assistance

  • scraig99 Profile Picture
    2 on at

    We found out that it is AA causing the issue - they ran the following scrip and got the same error in SQL

    I think I found the culprit SQL…

    I ran a new trace with more events and columns, and was looking at the error occurrence at 14:02:34.

    This has the same SPID as the errors we were looking at, and is the only other one that has a value other than null or 0 in the error column.

     
     

    Also take note of the duration (in milliseconds)… about 9.7 minutes.


    It’s a batch, with a monster SQL statement following a couple of statements to detect changes and then two more statements to drop the resulting temp tables.

    select * into #A5_ChangeTemp from CHANGETABLE(CHANGES AAG00905, 6817) A5_CT where A5_CT.SYS_CHANGE_VERSION <= 17219 AND A5_CT.SYS_CHANGE_OPERATION != 'D'
     
     select * into #A4_ChangeTemp from CHANGETABLE(CHANGES AAG00904, 6817) A4_CT where A4_CT.SYS_CHANGE_VERSION <= 17219 AND A4_CT.SYS_CHANGE_OPERATION != 'D'

    Monster query here, that references those temp tables

    drop table #A5_ChangeTemp  drop table #A4_ChangeTemp

    I changed the names of those temp tables and ran the first two manually, then edited the monster query to reference my temp tables, then ran it.  It took almost 10 minutes and gave the same error.  It has an order by and lots of joins, so I don’t doubt that it would be trying to create a worktable and running up against the SQL row length limit with how many columns are referenced in the query.

    Also I was seeing hints in the configuration console that this service checks for tasks to work on every minute.  We were seeing gaps of about 11 minutes between the errors. So I think it is trying this for 10 minutes and failing, then creating a new task to try again in a minute.  So that seems to fit too.

     

    It’s a complex query with multiple layers of sub queries so it would take some work to really pick it apart.  But Keith and I were just looking through it briefly together and he has some thoughts on what it is up to and things we might try to see if we can make the error go away by reducing something.

  • JoshP Profile Picture
    on at

    Hello!

    Thanks for the update. I understand that the customer has AA activated in their only Dynamics GP company and it is causing an issue with the data mart queries.

    A couple of suggestions:

    1. If the customer does not plan to report on AA data using Management Reporter, reading of the AA data can be disabled for just MR reports while leaving AA active in Dynamics GP. To do this, in Dynamics GP go to Tools | Setup | Company | Company and click the Options button. Then uncheck the AA option for MR. Note that after changing the option to report/not report on AA, it is required to restart the MR services and to also re-create the data mart.

    2. If the customer requires reporting on AA data with Management Reporter, then we will of course want to determine what is causing the issue. We will need to start with identifying if there are any mismatches between the data in the AA and GL tables in Dynamics GP causing the problem. To do this, use the queries in the KB article below:

    2910626                Financial Reports from Management Reporter do not match the General Ledger Trial Balance Reports in Microsoft Dynamics GP

    mbs.microsoft.com/.../KBDisplay.aspx;en-US;2910626

    Save all results of the queries. If there are any data issues detected, I recommend opening a support case for assistance to correct the AA data. The support team will need to know the results of all queries in order to assist you with correcting the data.

    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 > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans