You are not logged in.
Pages: 1
Our Audit Logs RS_AUDIT_LOG_ENTRY and RS_AUDIT_LOG_PROPERTY are logging data since 2016. Meanwhile we have 5 and 16 Mio entries.
Is it possible to delete all entries before eg 2020 without side effects (FK violation..)?
According to
https://forum.reportserver.net/viewtopic.php?id=699
and
https://reportserver.net/en/guides/admi … intenance/
it is possible with scripting. Do you have such a script?
Thanks in advance
Jens
Last edited by ConnectKaiser (2023-03-10 17:00:40)
Offline
Hi Jens,
you can use the following for deleting all log entries before a given date.
DELETE FROM RS_AUDIT_LOG_PROPERTY WHERE
LOG_ENTRY_ID IN(
SELECT
ENTITY_ID
FROM
RS_AUDIT_LOG_ENTRY
WHERE
DATE_FIELD < "${date}"
)
DELETE FROM RS_AUDIT_LOG_ENTRY WHERE DATE_FIELD < "${date}"
This can be of course integrated into a script using Groovy SQL: https://docs.groovy-lang.org/latest/htm … l/Sql.html
Regards,
Eduardo
Regards,
Eduardo
Offline
Pages: 1