Page 1 of 1

Automatic log from the transaction log

Posted: Wed Apr 13, 2016 5:18 am
by roei61
Hi experts,

I need ideas to how I can export the transaction log automatically to an ASCII file once a week.
I need a process that will take out from the transaction log all the transactions for cube A and export them to a file.
The file should have the same columns we gets while query the transaction log manually:
Log Time, Client, Old Value, New Value, Cube Name, Key 1...Key X

Thanks for all

Re: Automatic log from the transaction log

Posted: Wed Apr 13, 2016 5:29 am
by Alan Kirk
roei61 wrote: I need ideas to how I can export the transaction log automatically to an ASCII file once a week.
I need a process that will take out from the transaction log all the transactions for cube A and export them to a file.
The file should have the same columns we gets while query the transaction log manually:
Log Time, Client, Old Value, New Value, Cube Name, Key 1...Key X
Weeeelll.... the transaction log already is an ASCII file, but I get what you mean; you want an extract from it.

There are any number of tools that could do that for you from a Powershell script that you could run under Windows scheduling to SQL Server, but you already have a tool to hand, which is TM1 itself. One way of approaching this is to create a process which:
- Does a data save to ensure that all of the data is tucked away in transaction logs that you can access;
- Uses WildcardFileSearch() to iterate through your transaction log files;
- Passes each filename that's found as the data source name for a process which reads those logs and spits out as many extracts as you want using the ASCIIOutput or TextOutput functions.

This can of course be scheduled as a chore so that there is no need for any manual intervention.

Put all of the above together and you should find it's pretty easy to achieve.

Re: Automatic log from the transaction log

Posted: Wed Apr 13, 2016 11:16 am
by BariAbdul
Have a look at this post,It might help you:
http://www.tm1forum.com/viewtopic.php?t=9583 Thanks