(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.
- I added a operating system command (CmdExec) step to the end of my SQL Job, called it Run Batch File to Refresh MSTR.
- 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.
- 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
- The program consists of defining the connections, and calls the ExpireAllCaches(0) (clearing the report cache)
- And finally it updates all cubes.
- For this particular example, I only needed this on one project, but you could loop through multiple if needed.
Clear All MicroStrategy Caches:
Update MicroStrategy Intelligence Cubes: