How to Adjust Audit Trail Log Retention Time
By default, Actions Express retains audit trail logs for 30 days. The length of the retention can be adjusted in the database.
Finding Current Values
To check current settings, use the SQL query:
SELECT * FROM [YourTenantDB].[dbo].[TBL_Settings]
WHERE Name LIKE '%ActiveLogKeep%'
note
Replace `[YourTenantDB]' with the name of your tenant's database.
Log Names
- ActiveLogKeepHistoryBeforeArchive defines how many days of logs will be maintained in the audit trail.
- ActiveLogKeepArchive defines how many days of archived logs will be stored.
note
Archived logs can only be accessed through the Actions Express database and cannot be accessed in the user interface.
The Log Table
To view the log table, use the SQL query:
SELECT * FROM [YourTenantDB].[dbo].[TBL_LogArchive]
If the ActiveLogKeepArchive
value is set to 0, archiving is disabled.
Updating Log Archiving Settings
- When ActiveLogKeepHistoryBeforeArchive is set to 30, and ActiveLogKeepArchive is set to 15, logs are retained for a total of 45 days. Of these, the most recent 30 days remain accessible in the audit trail, while the prior 15 days are stored in the TBL_LogArchive table.
- When ActiveLogKeepHistoryBeforeArchive is set to 15, and ActiveLogKeepArchive is set to 3, logs are retained for a total of 18 days. Of these, the most recent 15 days remain accessible in the audit trail, while the prior 3 days are stored in the TBL_LogArchive table.
To update/enable log archiving:
UPDATE [Resolve].[dbo].[TBL_Settings]
SET Value= 15
WHERE Number = 84;