Can I run a truncate in the "auditlog" table

Can I run a truncate in the “auditlog” table


01 - What does the “auditlog” table refer to?
02 - How do I stop growing?
03 - Can I delete it?

I went in the option: ADVANCED > LOG > TRUNCATE.
But he just cleared the “LOG” table

the “AUDITLOG” remained intact.

How do I disable the Audit Log?

You can truncate it, but you’ll loose your history of who changed what. It can’t be disabled.

You’ll find a task in the Tasks page which you can use to delete old records or archive them off to the media library at your option.

Thanks for the feedback.

Where do I find the TASK option?

In my language the closest I found was “Maintenance”

Are any of these options?

That’s the correct page. You may need to click the Add new Task button at the top to add the audit log task.


And what should I fill in “NAME” and “PROGRAMMING”?

I just want to disable logging to prevent DB increase.

So for name, you can call it what you like. It’s just the name that it will show as in your tasks list.

The second box is how often that should be run in cron syntax.

I’d suggest once a day, in which case you’d want 0 1 * * * to mean 1am, every day.

OK, and the “stat” table can I delete too?

Is it possible to create a task as well, as I did in the auditlog?

or a button that I can delete without needing to access the database and manually delete?

I created the task as you informed,
I ran the task manually, and even then the auditlog table was not deleted.

Did I do something wrong?

You can’t delete the table, but you can truncate it. If you don’t need stats, then just turn them off. They’re off by default, so if they’re on, you’ve specifically turned them on in the Display Settings profiles.

Your task looks fine. It will run at 1am each day, and archive a little each time. If you have a huge backlog, it will take many weeks to get up to date. It will not delete everything in the table too, only older records will be removed.

The audit log table was not being deleted, I went to check and it was with 800 lines,
So I ran the task manually and it was not clean either

I had to manually clean up the database.

Note The task is ACTIVE, and in the settings contained the information that it was executed yesterday normally.

800 lines seems pretty reasonable to me. Audit log keeps several months worth of log information, so it sounds to me as if it’s working fine.

800 rows in an SQL database is nothing to be concerned at.

Thanks Alex.

Look, the stats table can not be cleaned by CMS.

I activated the statistics for a test, now I tried to clear the table by CMS and I can not.

  • Today is 04/07/2018.
  • The maintenance of the “stats” table is scheduled for 08/07/2018.
  • I clicked “RUN NOW” and it did not work.

As you can see the last execution was on 07/02/2018, and after I clicked “RUN NOW” several times the table “stats” had no change in its size or the date of last execution.

Note: In the profile of the players, the sending of statistics is already unchecked, and the saving period of the statistics was set for 1 day “minimum period allowed”.

Does this button not work? or its function is not to clear the stats table.

CMS Version 1.8.9

Run now will simply mean that the task is run next time XTR executes.

By default, 2 months of stats data is kept by the task, so it’s not going to do anything if you keep running it over and over again.

We know the code works. We use it every day. When the stats in your database are older than the limits the task works to, they will be archived in to the library as expected.

You can certainly truncate the stat table if you wish. I’ve no idea how that relates to the auditlog table that you mention in the question title however.