Page 1 of 1

Use rule to control Logging in }CubeProperties

Posted: Sun Mar 05, 2023 11:39 pm
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.

Re: Use rule to control Logging in }CubeProperties

Posted: Mon Mar 06, 2023 3:33 am
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.