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

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Better way to mass-delete old published reports in MR 2012 ?

(0) ShareShare
ReportReport
Posted on by 28,058 Moderator

Hi everyone,

I know this is not specific to Dynamics GP, as Management Reporter 2012 (aka MR2012) is used cross product wise for many Dynamics ERP's.. but the point is that I cam across this yesterday while doing a restore of our production MR database to my new GP 2015 Test bed server and realized that our MR database had grown as large as our main GP company... (almost 12GB).. to me that first didn't made any sense, until I realized that we had generated a lot of report versions in the past 6 months since we were bought up by a new head company last year... As our CFO was trying alll kinds of report variation to find the proper way of reporting against new rules.

This led me to dive into the MR report history and that's were I found out that you can delete old generated reports either one version by one version, or the entire generated report. MR is too dumb as it offers only 2 options when using the delete button for a report : delete the last generated version or delete all versions. When selecting the 'all' version option, and depending on the number of generated reports, this can be a fairly lengthy process, as your MR Viewer will be busy for a while doing the delete, even becoming unresponsive.

Microsoft must come up with a better way of managing historical report version. I can't believe that there is not a more speedier way of getting rid of old versions and clean-up your database. We've been using MR since around 2012 and it had in the early stage only a very slow grow rate... Now with the amount of various report definitions that were built over the time and considering that we report against a dozen GP companies, this becomes an issue on the long run.

Has anyone found a better way of handling this ?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Tom Cruse Profile Picture
    1,477 on at
    RE: Better way to mass-delete old published reports in MR 2012 ?

    Hey Beat just out of curiosity, is the mdf file the full 12 gigs or is the ldf file a good piece of that 12 gigs?

    I've seen it all too often where the database is set in Full Recovery Model instead of Simple and the transaction log file gets neglected and never get's a full backup. The thing will just blow up like a balloon and never get truncated and thus ever expanding in size.

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at
    RE: Better way to mass-delete old published reports in MR 2012 ?

    Hi Tom,

    No I'm taking care properly of my log files... :-).. it's really the MDF files that has grown to close 12Gb... there is also a small .NDF file, but that had remained in it's original size of 1Mb when it was allocated by the setup.

  • Tom Cruse Profile Picture
    1,477 on at
    RE: Better way to mass-delete old published reports in MR 2012 ?

    Wow, that is pretty large.

    Unfortunately I don't know of a better solution than the one you mentioned above, not much of a solution as more of a pain :)

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at
    RE: Better way to mass-delete old published reports in MR 2012 ?

    Tom,

    I'm currently testing a scenario, in which I take the genrated reports one by one and open the 'Versions' form to get all the generated history. Ordering the reports by date descending, I can see several various report names that usually have a month-end date as prefix to the report name (as the origin of the report is always the same definition). When I have multiple versions of the same sub-report, I delete all but the last one with a multi-selection in the list and the delete button from the Versions form.

    That's all I came up so far, but somehow we have to come up with a better process, like asking the users that generate the reports at any given time, once they have there last best version out, to go into history and delete the once not required anymore.

    Every report version can be anywhere from a few hundred MB's to several GB's, which multiplied by hundreds of generation can quickly overgrow your database...

  • Suggested answer
    Tim Foster Profile Picture
    8,515 on at
    RE: Better way to mass-delete old published reports in MR 2012 ?

    Béat,

    Have you seen this??

    www.nelsonet.net/.../dynamics-gp-management-reporter-database-fills-quickly

    Tim

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at
    RE: Better way to mass-delete old published reports in MR 2012 ?

    Hey Tim,

    Thanks for the link, this will indeed help a lot .. I'll test this out on my GP 2015 server.. it would serve the purpose of clearing out reports older than a certain range of time, but that also means you have to be careful how you generate your various versions of reports and not cumulate several mont-end reports into a single place...

    Definitely worth a look at.

  • Tim Foster Profile Picture
    8,515 on at
    RE: Better way to mass-delete old published reports in MR 2012 ?

    I had plans to try to leverage this SQL, but in a different way.  I wanted to read the Fiscal Year and Period information to keep the most recent version (by generation date) of a given fiscal Year and Period combination.

    Tim

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at
    RE: Better way to mass-delete old published reports in MR 2012 ?

    Tim,

    I had to adjust the report to the new reality of CU13... apparently Microsoft did some changes in between CU10 and CU13, as the DB schema is not the same anymore. The tables used to be mostly assigned to the 'dbo' schema in CU10, whereas at some point MS decided to create a new schema called 'reporting'  and extend the schemes to a total of 3 : Connector, Reporting & Scheduling...

    Don't ask me why, but after correcting this, I was able to run the clean-up script. The process is able to delete about 100-150 reports per minute, which in my case took about 10-12 minutes.. I'm now down to less then 900 reports from initially 3300 ..

    After a DBCC file shrink, my MDF file went down from close to 12GB to about 9GB... so not a lot of gain, but it's a start.

  • Tim Foster Profile Picture
    8,515 on at
    RE: Better way to mass-delete old published reports in MR 2012 ?

    What about the ldf?  That's where my concern is - I have 66Gb out of 88Gb total in the log drive (E:).

    Tim

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at
    RE: Better way to mass-delete old published reports in MR 2012 ?

    On my test bed system I put the SQL DBs in SIMPLE recovery mode to avoid dealing with large LDF files as I'm running my test servers on reduced resources (IT wont allocate me the same systems as in PROD for testing :-( )..

    I'd suggest to put the MR DB in Simple mode before starting the process (and after taking a backup of course), and put it back in FULL recovery mode once the clean-up is done...

    This is something I do as well when applying GP upgrades, as this generates a lot of volume of SQL operations and will help minimize the process time. You only have to remember to run a full backup after the DB has been put in FULL recovery mode, otherwise your transaction log backups will err out with an error.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans