Delete change log entries

gmsfzllc
gmsfzllc Member Posts: 12
Hi Readers,

Currently I am using NAV 2016. I have checked change log entries and found 176873500 lines. How can delete all log entries?

Please suggest....



Regards,

Answers

  • Kratos3064
    Kratos3064 Member Posts: 14
    There is a page called Delete Change Log Entries... for pre-BC Versions. You can access it by searching for it in the search bar.

    For BC, open Change log entries and under Actions tab, there is an action called Delete Entries

    This will open a page where you can filter entries by Date and Time and/or Table No.. Once you click ok, the filtered entries will be deleted
  • gmsfzllc
    gmsfzllc Member Posts: 12
    Thanks for your suggestion,

    But I have lots of record in log entries. How can delete all record so that My Database size could not be increased.

    Can I delete through SQL Logs.

    Regards,
  • SanderDk
    SanderDk Member Posts: 507
    Hi @gmsfzllc
    You cannot delete throw SQL Logs, but you can delete throw T-SQL but your transaction log would increase until truck the log after next full backup.
    That part cannot be skipped, unless you're willing to destroy your backups
    For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.
  • sorenhinrup
    sorenhinrup Member Posts: 136
    As @Kratos3064 mentioned, the standard delete change log entries should be enough to remove the entries.
    Then I would do two things:
    1. Setup the delete function to run in a Jobqueue, with a filter on change log entry date. And delete all logs older than a decided range.
    2. Go through the change log setup, to see if you log on to much.
  • Kratos3064
    Kratos3064 Member Posts: 14
    gmsfzllc wrote: »
    Thanks for your suggestion,

    But I have lots of record in log entries. How can delete all record so that My Database size could not be increased.

    Can I delete through SQL Logs.

    Regards,

    Yes, it takes time. But its the safest method. You can set the date in the date filter provided when you open the Delete Change Log Entries.. Page. It is advisable to not delete change log entries up-to past 1-3 months.

    And as @sorenhinrup mentioned, if you log on too much entries, taking a look at the change log setup and unchecking the records which you dont want to log might reduce the change log entry lines in the future.
  • BartPermentier
    BartPermentier Member Posts: 9
    You might want to delete in small parts because your log might fill and then he will just do a rollback. So over the weekend try to delete per year or per x months.
    Visit my Technical AL Blog at: https://www.altoolbox.com/