Page 1 of 1

Transaction Log File Recovery

Posted: Thu Jun 14, 2012 2:38 am
by conray
Hi all,

A user made a mistake by view zeroing out a cube using the wrong view.

I am not sure how can i recover the changes made, or is it even possible to do so?

1. Is there a way i can rollback the changes that i made using the transaction log?
2. Do i need to create a process to read each record in the log file and apply the old value back to the cube?
3. Is there any guide on manually recovering changes made using a the log file?

Re: Transaction Log File Recovery

Posted: Thu Jun 14, 2012 3:04 am
by Alan Kirk
conray wrote:Hi all,

A user made a mistake by view zeroing out a cube using the wrong view.

I am not sure how can i recover the changes made, or is it even possible to do so?

1. Is there a way i can rollback the changes that i made using the transaction log?
2. Do i need to create a process to read each record in the log file and apply the old value back to the cube?
3. Is there any guide on manually recovering changes made using a the log file?
Depends on how many entries we're talking about. Instructions for backing out the transaction log via GUI will be found here. However if there are tens of thousands of transactions the GUI may be too slow or cumbersome in which case it may be faster to do a data save, make a copy of the transaction log, load it into Excel, filter out the affected records, reverse the order, save it as a CSV and then run it in through a custom built TI process.

However option (a) (the GUI) is the safer and easier option if available to you.

Re: Transaction Log File Recovery

Posted: Thu Jun 14, 2012 3:11 am
by conray
Hi Alan,

Thanks for your prompt reply.

We are talking about a few 100k records here, so option (a) is not feasible here, but thanks for sharing that option, i didnt know that existed.

So now i am left with option (b).

Before that, i actually thought of something crazy.

Since i am 100% sure that there are no changes made today except for the view zero out oepration by the user, i am thinking of purposely crashing the server, stop the TM1 service, open the log file and delete all the log records in the log file, then restarting the service.

Sounds like it could work but i am not sure.

Re: Transaction Log File Recovery

Posted: Thu Jun 14, 2012 3:16 am
by Alan Kirk
conray wrote:Hi Alan,

Thanks for your prompt reply.

We are talking about a few 100k records here, so option (a) is not feasible here, but thanks for sharing that option, i didnt know that existed.

So now i am left with option (b).

Before that, i actually thought of something crazy.

Since i am 100% sure that there are no changes made today except for the view zero out oepration by the user, i am thinking of purposely crashing the server, stop the TM1 service, open the log file and delete all the log records in the log file, then restarting the service.

Sounds like it could work but i am not sure.
100% certainty always worries me in cases like this. :D

However if you're completely sure, another option (assuming that you haven't done a data save since the change was made) is to simply copy the .cub file out of the data directory to another folder. bring down the server normally, and copy the original .cub file back before starting it up. It would seem to have less risk of unintended consequences.

Re: Transaction Log File Recovery

Posted: Thu Jun 14, 2012 3:42 am
by conray
Hi Alan,

Well i am almost 110% sure in this case that there wasn't any data changes made today :mrgreen:

Anyway, i tried the method which you suggested, and all is well now :D

Thanks once again Alan.