Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
Purging the Audit table will take too long. What other options are available?
Description:
Audit purging can be a problem because it is done at runtime. If there is a significant amount of audit entries that need to be purged, this can take a long time, and in worse case scenarios can take longer than 24 hours. Are there alternative ways to purge the audit table?
Answer/Solution:
While support recommends using StarTeam as its designed and to let StarTeam purge audit records automatically, there are a few ways you can speed up this process if the data set to be purged is too large.
1)
Truncate the Audit table in the database. Run the following Query on your database:
SQL Server: TRUNCATE VIEW SYN_AUDITS;
Oracle: The audit table can differ depending on your server version. Run the following first.
SELECT "STNAME", "SQLNAME" FROM .CTABLES WHERE STNAME LIKE "%Audits%";
TRUNCATE TABLE EX: "truncate table s66;"
This command will erase all of the audit entries in your database in a single transaction. As a result, it will be almost instantaneous and your transaction log will not grow a lot.
2)
Slowly reduce the "Purge Audit entires older than X Days" value in your server configuration settings. If, for example, you purge audit entries older than 365 days and you reduce it to 30 days, it is almost guaranteed that your next server startup time will take significantly more time than it did before. Instead of reducing the value by 335 days at once, slowly reduce this number by 10 days at a time each server reboot. This will keep the audit purges within reasonable time frames as you slowly and gradually shave off the bottom of your Audit table.
If the Audit purge takes an inordinate amount of time after following the above, please report the issue to Borland Support
Author: Daniel Rice