bin/XEtemplates/Profiler TSQL Duration.xml
<event_sessions xmlns="http://schemas.microsoft.com/sqlserver/2008/07/extendedeventconfig">
<event_session name="Profiler TSQL Duration" maxMemory="4" eventRetentionMode="allowSingleEventLoss" trackCausality="true" dispatchLatency="30" maxEventSize="0" memoryPartitionMode="none"> <templateCategory> <!-- _locID_text="templateCategory" _locComment = "" -->Profiler Equivalents</templateCategory> <templateName> <!-- _locID_text = "templateName" _locComment = "" -->Profiler TSQL Duration</templateName> <templateDescription> <!-- _locID_text = "templateDescription" _locComment = "" -->Matches the 'TSQL_Duration' template in Profiler. Captures all Transact-SQL statements submitted to SQL Server by clients and their execution time (in microseconds). Use to identify slow queries. </templateDescription> <event package="sqlserver" name="rpc_completed"> <action package="sqlserver" name="session_id" /> <parameter name="collect_data_stream" value="1" /> <predicate> <and> <leaf> <comparator name="greater_than_uint64" package="package0"></comparator> <global name="database_id" package="sqlserver"></global> <value>4</value> </leaf> <leaf> <comparator name="equal_boolean" package="package0"></comparator> <global name="is_system" package="sqlserver"></global> <value>false</value> </leaf> </and> </predicate> </event> <event package="sqlserver" name="sql_batch_completed"> <action package="sqlserver" name="session_id" /> <predicate> <and> <leaf> <comparator name="greater_than_uint64" package="package0"></comparator> <global name="database_id" package="sqlserver"></global> <value>4</value> </leaf> <leaf> <comparator name="equal_boolean" package="package0"></comparator> <global name="is_system" package="sqlserver"></global> <value>false</value> </leaf> </and> </predicate> </event> </event_session> </event_sessions> |