I’ve recently updated the script that runs application maintenance utility for TM1 when you got CAM Security with Single SignOn enabled on Cognos BI. See this post for the description of the issue, I’m publishing a better take on a solution.
So why am I kicking the dust on this one?
I was using the ‘old’ VBS scripts on one of the current projects and was really struggling to get everyone to play nicely when a whole bunch of applications is refreshed at the same time. For example if a few applications are built on the same dimension, it’s just nice to be able to call ‘refresh application’ multiple times in the epilog.
Application maintenance utility (or rights management user interface for this matter) doesn’t queue up jobs, if you try doing refreshing an application when something else is running, you’d get a knee-jerk ‘Another job is running for this application or server’ error. So after a number of tries to make a nice ordered queue in VBS (using the good old file as ‘shared lock’ approach) and having some small but annoying hiccups, I decided to see if there’s a simpler way to get a proper mutex (mutually exclusive lock) in scripts and it seemed very straight-forward to do in PowerShell.
So with a bit of shameless copy-pasting from knowledgeable TM1 colleague I cobbled together a powershell script that does the same thing as my old VBS, with the following big differences:
I’ve published this script on GitHub, head over there to grab the code.
I’ll start releasing the source code for some other utilities that I have over there as well (all those Java based Excel functions), stay tuned.