Search code examples
c#sql-serverssasetlamo

How to explicitly set ProcessAffectedObjects to false when using CaptureXml on AMO Server object?


I'm currently generating XMLA scripts to process various parts of our data warehouse. I've found one situation where doing incremental updates I would prefer having ProcessAffectedObjects = false, but I'm having a hard time finding where to set that in the docs.

The basic code I'm using is as follows:

conn.CurrentServer.CaptureXml = true;
dimensions.ForEach(x => x.Process(ProcessType.ProcessUpdate));
conn.CurrentServer.CaptureXml = false;
conn.CurrentServer.ConcatenateCaptureLog(true,true,true).Dump();
server.ExecuteCaptureLog(true, true, true);

I've been digging through various overloads of Process, thinking perhaps that 5th parameter of bool analyzeImpactOnly would set it, but it doesn't seem to generate the appropriate XMLA. I would prefer not to edit the XMLA directly, but I will if I have to. For reference, the conn.CurrentServer object is an instance of Microsoft.AnalysisServices.Server.

Thanks in advance.


Solution

  • Annnnd I found the answer two seconds after posting.

    When you execute the XMLA generated, the third parameter is bool processAffected.

    server.ExecuteCaptureLog(true, true, false);

    Edit: Apparently this doesn't work either. The docs say that the parameter is "reserved for future use."

    Looks like I'll be modifying the XMLA directly.