I am configuring proactive caching with MSSQL management studio using a wizard (please look at the attached screenshoots below). It works fine, but I have to configure the same from code (C#, XMLA or any other way).
I cannot find enough information how to do this. For example this page from documentation tells about cache clearing, but nothing about cache setup: http://technet.microsoft.com/en-us/library/ms186654.aspx
Can anybody help with this please? Any useful links or code samles would be welcome.
Thanks in advance
As a starting point, you could let Management Studio generate the XMLA alter
script for you: In the first dialog of your question, configure the things as you like them to be, and then select "Script" in the top toolbar, and then the target where you want to see the XMLA.
If you want to go the .net way, AMO would be the API to use (see http://msdn.microsoft.com/en-us/library/microsoft.analysisservices.aspx, but there are nearly no code examples in this documentation). You would probably want to set the ProactiveCaching
property of the partition you want to change (see http://msdn.microsoft.com/en-us/library/microsoft.analysisservices.partition.proactivecaching.aspx) to a ProactiveCaching
object having the correct settings (see http://msdn.microsoft.com/en-us/library/microsoft.analysisservices.proactivecaching.aspx).
AMO coding normally works like this:
Server
object, call its Connect
method).Update
property on the changed object or a parent of it to write the changes back to the server.Disconnect
from the server. Better still, you are using the C# using
construct for the Server
object in the first step above, as Server
implements 'IDisposable'.