Page 1 of 1

Ti to delete Log files best practice

Posted: Tue Aug 22, 2017 8:45 am
by Mark RMBC
Quick question really:

Is there any issue with deleting TM1 log files using wilcardfilesearch in a TI process?

Or is it better to use the executecommand function to call a script?

Re: Ti to delete Log files best practice

Posted: Tue Aug 22, 2017 9:21 am
by Elessar

Re: Ti to delete Log files best practice

Posted: Tue Aug 22, 2017 9:23 am
by Alan Kirk
Mark RMBC wrote: Tue Aug 22, 2017 8:45 am Quick question really:

Is there any issue with deleting TM1 log files using wilcardfilesearch in a TI process?
Just that you need to be powerfully careful about how you define your search.
Mark RMBC wrote: Tue Aug 22, 2017 8:45 am Or is it better to use the executecommand function to call a script?
IMHO the best practice is DON'T. I zip those suckers up mercilessly with 7 Zip but I don't look at deleting any transaction logs for literally years.

However if you are bound and determined, I would recommend just tapping into the Bedrock library; specifically Bedrock.Server.LogFile.Delete. The code has already been checked and it allows you to optionally eliminate a range of other files as well. It also gives you control over the date range deleted.

Re: Ti to delete Log files best practice

Posted: Tue Aug 22, 2017 10:48 am
by Mark RMBC
Thanks for the feedback, will have a look at the bedrock process.

Haven't really acquainted myself with any of the bedrock processes, which on one level is good because I have tried to solve problems myself, albeit with help from the experts on here now and again! On another level it may be bad because a little knowledge can be dangerous!

I have written a TI using wildcardfilesearch which works and is in the test environment but I googled just to check there were no issues I hadn't thought of before deploying to live and the advice was shut the server down before deleting any log files etc. So that prompted me to post here!