marcosqlbi / SsasEventsAnalyzer

SSAS Events Analyzer
26 stars 9 forks source link

Automatic collection + xEvent "AutoRestart" option #5

Closed byobi closed 8 years ago

byobi commented 8 years ago

Previous version of the wiki states:

There is an AutoRestart property in the DISCOVER_TRACES DMV in Analysis Services, but it is unknown whether it works or not (and how to set it)

Current version states:

The property AutoRestart automatically restart the collection of extended events when the service starts. You can check the state of this property using the DISCOVER_TRACES DMV in Analysis Services.

As far as I'm aware, this property can't be set in the xmla trace definition (as of SSAS 13.0.2149). Is this a feature we are expecting to be available in an upcoming SSAS 2016 CU/SP?

marcosqlbi commented 8 years ago

For some reason I didn't commit the new XMLA code (it's on a PC in my office and I'll be back only next week). Look at the AutoRestart node below...


<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
       <ObjectDefinition>
              <Trace>
                     <AutoRestart>true</AutoRestart>
                     <ID>TraceQuery</ID>
                     <Name>TraceQuery</Name>
                     <XEvent xmlns="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
                           <event_session name="TraceQuery" dispatchLatency="0" maxEventSize="0" maxMemory="4" memoryPartition="none" eventRetentionMode="AllowSingleEventLoss" trackCausality="true" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
                                  <event package="AS" name="QueryEnd" />
                                  <target package="package0" name="event_file">
                                         <parameter name="filename" value="C:\Program Files\Microsoft SQL Server\MSAS13.TAB16\OLAP\Log\TraceQuery.xel" />
                                         <parameter name="max_file_size" value="4096" />
                                         <parameter name="max_rollover_files" value="10" />
                                         <parameter name="increment" value="1024" />
                                  </target>
                           </event_session>
                     </XEvent>
              </Trace>
       </ObjectDefinition>
</Create>
byobi commented 8 years ago

that's amazing! I'd seen the documentation, but was never able to find enough details for how to specify the option in the XMLA create trace command... figured it was code reuse from the DB-engine that hadn't been implemented in SSAS.

thank you - this certainly makes things a bit easier ;-)