Use SQL Server Extended Events (XEvents) to Monitor Analysis Services
Analysis Services provides tracing capabilities through the usage of Extended Events.
Extended Events is an event infrastructure that is highly scalable and configurable for server systems. Extended Events is a light weight performance monitoring system that uses very few performance resources.
All Analysis Services events can be captured and target to specific consumers, as defined in Extended Events, through XEvents.
Extended Event tracing is enabled using a similar XMLA create object script command as shown below:
<Execute …>
<Command>
<Batch …>
<Create …>
<ObjectDefinition>
<Trace>
<ID>trace_id</ID>
<Name>trace_name</Name>
<ddl300_300:XEvent>
<event_session …>
<event package="AS" name="AS_event">
<action package="PACKAGE0" …/>
</event>
<target package="PACKAGE0" name="asynchronous_file_target">
<parameter name="filename" value="data_filename.xel"/>
<parameter name="metadatafile" value="metadata_filename.xem"/>
</target>
</event_session>
</ddl300_300:XEvent>
</Trace>
</ObjectDefinition>
</Create>
</Batch>
</Command>
<Properties></Properties>
</Execute>
Where the following elements are to be defined by the user, depending on the tracing needs:
To stop the Extended Events tracing object you need to delete that object using a similar XMLA delete object script command as shown below:
<Execute xmlns="urn:schemas-microsoft-com:xml-analysis">
<Command>
<Batch …>
<Delete …>
<Object>
<TraceID>trace_id</TraceID>
</Object>
</Delete>
</Batch>
</Command>
<Properties></Properties>
</Execute>
Where the following elements are to be defined by the user, depending on the tracing needs: