DB Logging Clean Up

  • DB Logging Clean Up

    Posted by DSC Communities on March 27, 2017 at 10:52 am
    • Bill Fuller

      Member

      March 27, 2017 at 10:52 AM


      Hi all,

          Running Dynamics AX 2012 R3,   we have had a few DB logs set up since go live and have not yet run the DB log clean up routine.   Can someone provide some pointers or recommend articles on correct way to select the parameters in the DB log clean up query.  I am finding articles that it needs to be run,  but not specifics on selecting the parameters and details on actually running it.

      Thanks, Bill  

      ——————————
      Bill Fuller
      Mgr. System Administration Team

      Allegion Information Technology
      11819 North Pennsylvania St
      Carmel, IN 46032
      ——————————

    • Scott Morley

      Member

      March 27, 2017 at 11:47 AM

      Bill,
      Without knowing why you set up the logging it is hard to make recommendations. Is it for legal reasons, or just to have an audit trail? Each of the logs you set up will be linked to the table ID you are monitoring. Your best bet is going to be to review each log, figure out why you have it and that should answer how long you need to keep it. Then for each table that you are logging, create a cleanup job that will remove records older than your retention period. If they all have the same retention period, you only need one cleanup job where you would leave the table and log type blank and just set a date.
      You can get pretty granular and creative with the selection criteria, for example using < year(-1) for the date range. That will dynamically calculate the date based on the run date so you can set up a recurring job.  Obviously you want to run this in dev or test first and pass it by legal if they had any involvement in setting up the audits.
      Additional options on selection criteria can be found at Advanced filtering and query options [AX 2012].

      Microsoft remove preview
      Advanced filtering and query options [AX 2012]
      Productivity tools for end users Advanced filtering and query options
      View this on Microsoft >

      ——————————
      Scott Morley
      Principal Application Architect
      OneNeck IT Solutions
      Bend OR
      ——————————
      ——————————————-

    • Bill Fuller

      Member

      March 27, 2017 at 2:30 PM

      Thank You Scott  for the Info and leads..  At this point, the logs implemented were just  audit trails, nothing for legal or audit yet, but that is coming.   

      ——————————
      Bill Fuller
      Mgr. System Administration Team

      Allegion Information Technology
      11819 North Pennsylvania St
      Carmel, IN 46032
      ——————————
      ——————————————-

    • Scott Morley

      Member

      March 27, 2017 at 11:54 AM

      Sorry, a little clarification. You can use year(-1) in a query in code, but when using a form filter, the best bet is to use (yearRange(lowerbound,upperbound)) or the day or month equivalents. 

      ——————————
      Scott Morley
      Principal Application Architect
      OneNeck IT Solutions
      Bend OR
      ——————————
      ——————————————-

    DSC Communities replied 8 years, 5 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘DB Logging Clean Up’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!