bin/xetemplates/db_ola_health.xml
<event_sessions xmlns="http://schemas.microsoft.com/sqlserver/2008/07/extendedeventsconfig"><event_session name="database_health" maxMemory="4" eventRetentionMode="allowMultipleEventLoss" trackCausality="true" dispatchLatency="30" maxEventSize="0" memoryPartitionMode="perNode"><templateCategory>
<!-- _locID_text="templateCategory" _locComment = "" -->System Monitoring</templateCategory> <templateName> <!-- _locID_text = "templateName" _locComment = "" -->Custom</templateName> <templateDescription> <!-- _locID_text = "templateDescription" _locComment = "" -->Custom Template from Ola Hallengren</templateDescription><event package="sqlos" name="wait_completed"><action package="sqlserver" name="client_app_name" /><action package="sqlserver" name="client_hostname" /><action package="sqlserver" name="client_pid" /><action package="sqlserver" name="database_id" /><action package="sqlserver" name="database_name" /><action package="sqlserver" name="nt_username" /><action package="sqlserver" name="plan_handle" /><action package="sqlserver" name="query_hash_signed" /><action package="sqlserver" name="query_plan_hash_signed" /><action package="sqlserver" name="request_id" /><action package="sqlserver" name="session_id" /><action package="sqlserver" name="session_resource_group_id" /><action package="sqlserver" name="transaction_id" /><action package="sqlserver" name="tsql_frame" /><action package="sqlserver" name="username" /><predicate><and><and><and><and><and><and><and><and><leaf><comparator name="equal_boolean" package="package0"></comparator><global name="is_system" package="sqlserver"></global><value>false</value></leaf><leaf><comparator name="greater_than_equal_uint64" package="package0"></comparator><event name="wait_completed" package="sqlos" field="duration"></event><value>5000</value></leaf></and><leaf><comparator name="not_equal_uint64" package="package0"></comparator><event name="wait_completed" package="sqlos" field="wait_type"></event><value>232</value></leaf></and><leaf><comparator name="not_equal_uint64" package="package0"></comparator><event name="wait_completed" package="sqlos" field="wait_type"></event><value>230</value></leaf></and><leaf><comparator name="not_equal_uint64" package="package0"></comparator><event name="wait_completed" package="sqlos" field="wait_type"></event><value>393</value></leaf></and><leaf><comparator name="not_equal_uint64" package="package0"></comparator><event name="wait_completed" package="sqlos" field="wait_type"></event><value>663</value></leaf></and><leaf><comparator name="not_equal_uint64" package="package0"></comparator><event name="wait_completed" package="sqlos" field="wait_type"></event><value>759</value></leaf></and><leaf><comparator name="not_equal_uint64" package="package0"></comparator><event name="wait_completed" package="sqlos" field="wait_type"></event><value>1102</value></leaf></and><leaf><comparator name="not_equal_uint64" package="package0"></comparator><event name="wait_completed" package="sqlos" field="wait_type"></event><value>1006</value></leaf></and></predicate></event><event package="sqlos" name="wait_info_external"><action package="sqlserver" name="client_app_name" /><action package="sqlserver" name="client_hostname" /><action package="sqlserver" name="client_pid" /><action package="sqlserver" name="database_id" /><action package="sqlserver" name="database_name" /><action package="sqlserver" name="nt_username" /><action package="sqlserver" name="plan_handle" /><action package="sqlserver" name="query_hash_signed" /><action package="sqlserver" name="query_plan_hash_signed" /><action package="sqlserver" name="request_id" /><action package="sqlserver" name="session_id" /><action package="sqlserver" name="session_resource_group_id" /><action package="sqlserver" name="transaction_id" /><action package="sqlserver" name="tsql_frame" /><action package="sqlserver" name="username" /><predicate><and><and><leaf><comparator name="equal_uint64" package="package0"></comparator><event name="wait_info_external" package="sqlos" field="opcode"></event><value>1</value></leaf><leaf><comparator name="equal_boolean" package="package0"></comparator><global name="is_system" package="sqlserver"></global><value>false</value></leaf></and><leaf><comparator name="greater_than_equal_uint64" package="package0"></comparator><event name="wait_info_external" package="sqlos" field="duration"></event><value>5000</value></leaf></and></predicate></event><event package="sqlserver" name="blocked_process_report" /><event package="sqlserver" name="database_file_size_change"><action package="sqlserver" name="client_app_name" /><action package="sqlserver" name="client_hostname" /><action package="sqlserver" name="client_pid" /><action package="sqlserver" name="nt_username" /><action package="sqlserver" name="plan_handle" /><action package="sqlserver" name="request_id" /><action package="sqlserver" name="session_id" /><action package="sqlserver" name="session_resource_group_id" /><action package="sqlserver" name="transaction_id" /><action package="sqlserver" name="username" /><parameter name="collect_database_name" value="1" /></event><event package="sqlserver" name="error_reported"><action package="sqlserver" name="client_app_name" /><action package="sqlserver" name="client_hostname" /><action package="sqlserver" name="client_pid" /><action package="sqlserver" name="database_id" /><action package="sqlserver" name="database_name" /><action package="sqlserver" name="nt_username" /><action package="sqlserver" name="plan_handle" /><action package="sqlserver" name="request_id" /><action package="sqlserver" name="session_id" /><action package="sqlserver" name="session_resource_group_id" /><action package="sqlserver" name="transaction_id" /><action package="sqlserver" name="tsql_frame" /><action package="sqlserver" name="username" /><predicate><leaf><comparator name="greater_than_int64" package="package0"></comparator><event name="error_reported" package="sqlserver" field="severity"></event><value>10</value></leaf></predicate></event><event package="sqlserver" name="module_end"><action package="sqlserver" name="client_app_name" /><action package="sqlserver" name="client_hostname" /><action package="sqlserver" name="client_pid" /><action package="sqlserver" name="database_id" /><action package="sqlserver" name="database_name" /><action package="sqlserver" name="nt_username" /><action package="sqlserver" name="plan_handle" /><action package="sqlserver" name="request_id" /><action package="sqlserver" name="session_id" /><action package="sqlserver" name="session_resource_group_id" /><action package="sqlserver" name="transaction_id" /><action package="sqlserver" name="tsql_frame" /><action package="sqlserver" name="username" /><predicate><and><leaf><comparator name="equal_boolean" package="package0"></comparator><global name="is_system" package="sqlserver"></global><value>false</value></leaf><leaf><comparator name="greater_than_equal_uint64" package="package0"></comparator><event name="module_end" package="sqlserver" field="duration"></event><value>5000000</value></leaf></and></predicate></event><event package="sqlserver" name="rpc_completed"><action package="sqlserver" name="client_app_name" /><action package="sqlserver" name="client_hostname" /><action package="sqlserver" name="client_pid" /><action package="sqlserver" name="database_id" /><action package="sqlserver" name="database_name" /><action package="sqlserver" name="nt_username" /><action package="sqlserver" name="request_id" /><action package="sqlserver" name="session_id" /><action package="sqlserver" name="session_resource_group_id" /><action package="sqlserver" name="transaction_id" /><action package="sqlserver" name="username" /><predicate><and><leaf><comparator name="equal_boolean" package="package0"></comparator><global name="is_system" package="sqlserver"></global><value>false</value></leaf><or><leaf><comparator name="greater_than_equal_uint64" package="package0"></comparator><event name="rpc_completed" package="sqlserver" field="duration"></event><value>5000000</value></leaf><leaf><comparator name="not_equal_uint64" package="package0"></comparator><event name="rpc_completed" package="sqlserver" field="result"></event><value>0</value></leaf></or></and></predicate></event><event package="sqlserver" name="sql_batch_completed"><action package="sqlserver" name="client_app_name" /><action package="sqlserver" name="client_hostname" /><action package="sqlserver" name="client_pid" /><action package="sqlserver" name="database_id" /><action package="sqlserver" name="database_name" /><action package="sqlserver" name="nt_username" /><action package="sqlserver" name="request_id" /><action package="sqlserver" name="session_id" /><action package="sqlserver" name="session_resource_group_id" /><action package="sqlserver" name="transaction_id" /><action package="sqlserver" name="username" /><parameter name="collect_batch_text" value="1" /><predicate><and><leaf><comparator name="equal_boolean" package="package0"></comparator><global name="is_system" package="sqlserver"></global><value>false</value></leaf><or><leaf><comparator name="greater_than_equal_uint64" package="package0"></comparator><event name="sql_batch_completed" package="sqlserver" field="duration"></event><value>5000000</value></leaf><leaf><comparator name="not_equal_uint64" package="package0"></comparator><event name="sql_batch_completed" package="sqlserver" field="result"></event><value>0</value></leaf></or></and></predicate></event><event package="sqlserver" name="xml_deadlock_report"><action package="sqlserver" name="database_name" /></event><target package="package0" name="event_file"><parameter name="filename" value="database_health.xel" /><parameter name="max_file_size" value="5" /><parameter name="max_rollover_files" value="100" /></target></event_session></event_sessions> |