Sunday, June 6, 2010

Push the button... One way to automate boring manual processes. (Part 3 of 4)

Alright, on to the MicroStrategy part of this puzzle.

(Read Part 1, or Part 2)

You'd need the MicroStrategy SDK license if you want to be compliant with the usage of this code. FYI - we were on MSTR 9.0.209.
  1. I added a operating system command (CmdExec) step to the end of my SQL Job, called it Run Batch File to Refresh MSTR.
  2. I created the code in C#, just a simple console application, called MSTR_Refresh.exe and deployed it to the same server that held our MicroStrategy Intelligence Server service.
  3. I created a Windows Scheduled Task on the MicroStrategy Intelligence Server which runs the code, located locally, along with the necessary MicroStrategy dll: Interop.DSSCOMMMasterLib.dll
  4. The program consists of defining the connections, and calls the ExpireAllCaches(0) (clearing the report cache)
  5. And finally it updates all cubes. 
  6. For this particular example, I only needed this on one project, but you could loop through multiple if needed. 
As always, back everything up before attempting this. Enjoy!

Clear All MicroStrategy Caches:

Update MicroStrategy Intelligence Cubes:

No comments: