Page 1 of 1

Purge logs - anything older than X number of days

Posted: Mon Jun 10, 2013 6:36 am
by jreddy
Hi,
Any advise on easiest routine or job that can be written to purge logs that are more than X number of days old ? Are all the logs in files or in XMETA or a combination of both for 8.1 release ?

The problem is that though we had the auto-purge settings in development, when the project was created and migrated to production, the admins missed the step and now we realized 2 months later that the logs are not being purged. Applying the auto-purge settings in administrator now will not help obviously.. so trying to come up with some routine or batch control that can be scheduled to purge logs.

Thanks in advance

Re: Purge logs - anything older than X number of days

Posted: Mon Jun 10, 2013 6:49 am
by chulett
jreddy wrote:Applying the auto-purge settings in administrator now will not help obviously..
Are you certain about that? While in the past that was true - Admin changes only affected new jobs - pretty sure I recall them changing that behavior. It would be worth a quick check IMHO unless you've already done that.

Posted: Mon Jun 10, 2013 6:55 am
by jreddy
Oh I hadn't heard about that changing with recent versions, thanks Craig. I will check it out and let you know what happens - thanks

Posted: Mon Jun 10, 2013 2:47 pm
by ray.wurlod
I don't think what Craig said is true. Changes to auto-purge settings still only affect subsequently-created jobs.

Search DSXchange for examples of routines. Another approach would be to enable tracing then perform the required purge manually. The trace file will show all the routines that get called.

Posted: Mon Jun 10, 2013 4:31 pm
by chulett
Pretty sure I recall reading here that any job with 'default' purge settings would now automatically inherit any changes to the Project level defaults. Ones where that had been 'overridden' would not. I recall being surprised by the posting of that information... let me see if I can turn it up...

Simply enough for someone to test.