Ti to delete Log files best practice

Post Reply
Mark RMBC
Community Contributor
Posts: 292
Joined: Tue Sep 06, 2016 7:55 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: Excel 2010

Ti to delete Log files best practice

Post 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?
User avatar
Elessar
Community Contributor
Posts: 331
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: Ti to delete Log files best practice

Post by Elessar »

Best regards, Alexander Dvoynev

TM1 and Data Science blog: 6th article - PAfE + VBA: Commit each cell without pressing “Commit” button.
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Ti to delete Log files best practice

Post 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.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Mark RMBC
Community Contributor
Posts: 292
Joined: Tue Sep 06, 2016 7:55 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: Excel 2010

Re: Ti to delete Log files best practice

Post 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!
Post Reply