opalis: how to purge logs
curious how to purge logs from your opalis server? it's so simple, i'll illustrate it using pictures.
if you're a t-sql person, according to the opalis forums, it's just a stored procedure (sp_CustomLogCleanup). here's a snippet of how to use it:
Log Purge functionality has three options:
- Keep last x number of records
- Keep last y number of days.
- If records are older than y number of days, keep last x number of records.
These three options dictate how the stored procedure “sp_CustomLogCleanup” is called. To call the stored procedure in a manner that mimics the Log Purge functionality (but without the hardcoded timeout) you can execute one of the following three scripts in SQL Management Studio where @XEntries is the number of entries to keep and @YDays is the number of days to either keep entries or the number of days to determine when entries should be processed:
Option #1
DECLARE @Completed bit
SET @Completed = 0
WHILE @Completed = 0 EXEC sp_CustomLogCleanup @Completed OUTPUT, @FilterType=1,@XEntries=1000Option #2
DECLARE @Completed bit
SET @Completed = 0
WHILE @Completed = 0 EXEC sp_CustomLogCleanup @Completed OUTPUT, @FilterType=2,@YDays=7Option #3
DECLARE @Completed bit
SET @Completed = 0
WHILE @Completed = 0 EXEC sp_CustomLogCleanup @Completed OUTPUT, @FilterType=3,@XEntries=1000,@YDays=7
here's the original thread if you want to read more.
Comments
Post a Comment