Use rule to control Logging in }CubeProperties

Post Reply
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Use rule to control Logging in }CubeProperties

Post by macsir »

Hi, all
I was under impression that we could control "LOGGIN" using a rule in the cube, but looks like it is not the case. My version is 11.8.00300.34.
I am using

Code: Select all

['LOGGING'] = S:  'YES';
The usual way from CubeSetLogChanges and cube security assignment work fine. Any idea? Thanks.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
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: Use rule to control Logging in }CubeProperties

Post by Alan Kirk »

macsir wrote: Sun Mar 05, 2023 11:39 pm Hi, all
I was under impression that we could control "LOGGIN" using a rule in the cube, but looks like it is not the case. My version is 11.8.00300.34.
I am using

Code: Select all

['LOGGING'] = S:  'YES';
The usual way from CubeSetLogChanges and cube security assignment work fine. Any idea? Thanks.
I doubt that would work, though I can understand why you want to do it.

The server is unlikely to be constantly running to the cube to check what the transaction logging state is. If it did, it would need to go and check that eeeevvvery single time someone wrote a value, which would be hellishly inefficient. The "flag" to determine whether or not transaction logging is on would exist in memory as part of the object definition. That in memory flag is what both CubeSetLogChanges and the cube security assignment window would affect. That would in turn cause the value in }CubeProperties to be updated, but the reverse is not true; that is to say, }CubeProperties is just a record that the server keeps of its settings, rather than BEING the settings.

Besides, if the setting were to be set by a rule (and the cell value really did determine what the setting is rather than just being a record of it), there would be no way of disabling the logging state when you need to.

If, as I suspect, your concern is that logging is sometimes turned off, I suggest checking over your TI code to make sure that if the TI turns logging off, it will ALSO turn it back on even if there is a crash of one process. (That's the usual cause of logging being turned off unexpectedly.)

Another option is to have a frequently scheduled process to ensure that logging is on, but that's a last rather than first resort.
"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.
Post Reply