Export (0) Print
Expand All

Monitor Analysis Services with SQL Server Extended Events

 

Updated: August 31, 2015

Applies To: SQL Server 2016 Preview

Analysis Services provides tracing capabilities through the usage of Extended Events.

Extended Events is a highly scalable and configurable infrastructure 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 targeted to specific consumers, as defined in Extended Events, through XEvents.

SQL Server 2016 added a graphical user interface to SQL Server Management Studio to configure and manage Analysis Services Extended Events. You can also configure Analysis Services Extended Event sessions through XMLA scripting, as was supported in previous releases.

ssas_extended_events_ssms_start

The current implementation of the Analysis Services Extended Events user interface does not support updating or viewing an existing session.

Supported targets for Data Storage:

  • event_file

  • event_stream

  • ring_buffer

After you configure a session for the desired events and data storage, you can click the script button to send your configuration to one of supported destinations including a file, a new query in SQL Server Management Studio, and the clipboard.

The current implementation of the Analysis Services Extended Events user interface does not support updating or viewing an existing session.

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:

trace_id

Defines the unique identifier for this trace.

trace_name

The name given to this trace; usually a human readable definition of the trace. It is a common practice to use the trace_id value as the name.

AS_event

The Analysis Services event to be exposed. See Analysis Services Trace Events for names of the events.

data_filename

The name of the file that contains the events data. This name is suffixed with a time stamp to avoid data overwriting if the trace is sent over and over.

metadata_filename

The name of the file that contains the events metadata. This name is suffixed with a time stamp to avoid data overwriting if the trace is sent over and over.

Arrow icon used with Back to Top link In this topic

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:

trace_id

Defines the unique identifier for the trace to be deleted.

Arrow icon used with Back to Top link In this topic

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft