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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

SRSTMPDATASTORE and other "TMP" tables

(0) ShareShare
ReportReport
Posted on by 17,790

I've notice that the SRSTMPDATASTORE table seems to grow forever.  I have records going back to the start of our production environment.  The same appears to be true with other TMP tables like SALESINVOICETMP, SALESCONFIRMHEADERTMP, SALESCONFIRMDETAILTMP, and probably a couple dozen other tables.

Is there a process built into AX to clean up these tables?  I would have thought the SSRS reports would do it when they were completed, but apparently not.

*This post is locked for comments

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

    the tables you have mentioned by name are not temporary tables by table type, they would have TMP in name due to their usage in framework.

  • Brandon Wiese Profile Picture
    17,790 on at

    Of course they're not temporary tables by table type, or they wouldn't be sitting in the business database with data at rest at all.  But they do accumulate records over time that appear pointless and wasteful of storage, and I haven't yet found a built-in process that cleans them up either automatically or on demand.

  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 2 on at

    as per my thoughts for each report, data is being cleared at time RDP or Controller class is run.

    You can experiment something as under

    Go to class SalesConfirmationDP and search the text delete

    similarly go to Class SalesInvoiceDP

    also, pay a visit to class BankBillOfExchangeController >> ProcessReport

    All such reports are using pre-process approach by using SrsReportDataProviderPreProcess

  • Brandon Wiese Profile Picture
    17,790 on at

    Based on your reply, I did some further testing.  It does appear that rendering the Sales invoice to screen causes the postReportRun(..) cleanup to delete the SalesInvoiceTmp and related temporary data.  It also appears that some methods of running reports, such as through EP, do not properly cleanup the records.  I haven't tested every possible scenario yet, but it seems clear now the problem is related to how/where the report is run, at least in the case of SalesInvoiceTmp and other form letter documents.

  • Verified answer
    Brandon Wiese Profile Picture
    17,790 on at

    I've located at least one place where a call to postReportRun(..) should be called but is not, and that seems to resolve at least some of the cases where form letter TMP records were not deleted.

    Now onto SRSTmpDataStore, for which I believe the records are used to marshall in-memory temporary tables into the report server context.

  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 2 on at

    I believe certain reports may need to include manual fix by adding any line(s) of code, though its difficult to reproduce issue, on different installations of AX

  • André Arnaud de Calavon Profile Picture
    306,915 Super User 2026 Season 2 on at

    Hi Brandon,

    Did you manually clear the SRSTmpDataStore table and possibly find any negative side effects when the records were deleted? Or was everything still working correctly? I do see a growing table at a customer running AX 2012 R2. SQL server is reporting missing indexes on this table due to the number of records.

  • Brandon Wiese Profile Picture
    17,790 on at

    I have been clearing the table weekly for months with no ill effects.

  • André Arnaud de Calavon Profile Picture
    306,915 Super User 2026 Season 2 on at

    Hi Brandon,

    Sorry for my late response, but many thanks for your reply. Wel will continue and clean up this table as well.

  • guk1964 Profile Picture
    10,888 on at

    Its worth reading this link  msdn.microsoft.com/.../bb314749.aspx

    The retail statement posting, is an example of a report that uses  a large number of tmp tables. In such cases performance can be poor and that can result in records that don't get deleted, so its worth taking time to dig into this.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans