Page 1 of 1

How to get username with timestamp for last cube update

Posted: Wed Feb 26, 2014 4:06 pm
by BariAbdul
I am trying to get last updated cube timestamp for which I am trying below script :
sFile= ' >cmd /dir *SalesPlan..cub /n/o:n/t:w > Cube_with_last_save_timestamp.txt' ;
ExecuteCommand(sFile,1);
I have also tried without cmd but I am getting error "The system could not find the file specified"
Actually I need to get the user name along with the timestamp who made last update on the cube ,I understand TM1s.log consists the username and the timestamp. How could I leverage it to get username with timestamp. Appreciate your help. Thanks

Re: How to get username with timestamp for last cube update

Posted: Wed Feb 26, 2014 4:11 pm
by tomok
You realize, of course, that the date and time stamp on the cube and the last time someone updated data in the cube are not related, right? The date and time stamp on the .cub file only get's updated whenever you issue a SaveDataAll command, not necessarily when someone writes to the cube.

Re: How to get username with timestamp for last cube update

Posted: Wed Feb 26, 2014 6:04 pm
by jim wood
Couldn't you just get this information from your log files?

Re: How to get username with timestamp for last cube update

Posted: Wed Feb 26, 2014 10:54 pm
by winsonlee
If cube logging is enabled, why not use transaction log to get the required information ?
Not through the tm1s.log but through the Transaction Log Query interface.

Re: How to get username with timestamp for last cube update

Posted: Thu Feb 27, 2014 3:57 am
by BariAbdul
Thanks Tomok,Jim,Winson.My apologies for not making my self clear.I need to get the information of username and time stamp who made last update on the cube and store this information in two dimensional cube so that i could input it in to another cube by using CellGetS /CellGetN function.How could I retrieve the latest username and timestamp from Transaction log.Thanks a lot again.

Re: How to get username with timestamp for last cube update

Posted: Thu Feb 27, 2014 4:17 am
by winsonlee
http://www.tm1forum.com/viewtopic.php?p=16098

Have a read at the above topic to find out if it is the answer you looking for.
If you do not want to use relational database, you can still loop through the transaction log with TI to read the data back to the cube.

Re: How to get username with timestamp for last cube update

Posted: Thu Feb 27, 2014 10:17 am
by BariAbdul
Thanks Winson,I know there is a WildcardFileSearch function to loop through the Transaction Log but I am not able to get to proceed further beyond this,Could you Please help.Thanks

Re: How to get username with timestamp for last cube update

Posted: Thu Feb 27, 2014 3:20 pm
by lotsaram
BariAbdul wrote:Thanks Winson,I know there is a WildcardFileSearch function to loop through the Transaction Log but I am not able to get to proceed further beyond this,Could you Please help.Thanks
BariAbdul, the structure of the tm1s transaction logs is not difficult and can be easily deciphered on simple inspection. Variability of number of columns per record is not relevant since the user name, timestamp and cube name are always in the same location, only the cell address is variable due to differing numbers of dimensions per cube. Similarly looping through files in a directory with WildcardFileSearch is not rocket science and something you could quite easily find dozens of examples of with a quick search of this forum.

You are straight out asking someone to do your job for you and as you have been told before there are good reasons why "give me the code" questions are viewed rather dimly.

Re: How to get username with timestamp for last cube update

Posted: Thu Feb 27, 2014 5:30 pm
by BariAbdul
Thanks lotsaram,I will give it a go.