{"id":545,"date":"2010-12-19T23:15:00","date_gmt":"2010-12-19T23:15:00","guid":{"rendered":"\/blogs\/jonathan\/post\/An-XEvent-a-Day-(19-of-31)-e28093-Using-Customizable-Fields.aspx"},"modified":"2017-04-13T12:16:38","modified_gmt":"2017-04-13T16:16:38","slug":"an-xevent-a-day-19-of-31-using-customizable-fields","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/","title":{"rendered":"An XEvent a Day (19 of 31) \u2013 Using Customizable Fields"},"content":{"rendered":"<p>Today\u2019s post will be somewhat short, but we\u2019ll look at Customizable Fields on Events in Extended Events and how they are used to collect additional information.&#160; Customizable Fields generally represent information of potential interest that may be expensive to collect, and is therefore made available for collection if specified by the Event Session.&#160; In SQL Server 2008 and 2008 R2, there are 50 Events that have customizable columns in their payload.&#160; In SQL Server Denali CTP1, there are 124 Events that have customizable columns in their payload. The customizable columns and Events that have them can be found with the following query.<\/p>\n<blockquote>\n<pre class=\"code\"><span style=\"color: blue\">SELECT \r\n    <\/span><span style=\"color: teal\">p<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">name <\/span><span style=\"color: blue\">AS <\/span><span style=\"color: teal\">package_name<\/span><span style=\"color: gray\">,\r\n    <\/span><span style=\"color: teal\">o<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">name <\/span><span style=\"color: blue\">AS <\/span><span style=\"color: teal\">event_name<\/span><span style=\"color: gray\">,\r\n    <\/span><span style=\"color: teal\">oc<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">name <\/span><span style=\"color: blue\">AS <\/span><span style=\"color: teal\">column_name<\/span><span style=\"color: gray\">,\r\n    <\/span><span style=\"color: teal\">oc<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">column_type<\/span><span style=\"color: gray\">,\r\n    <\/span><span style=\"color: teal\">oc<\/span><span style=\"color: gray\">.<\/span><span style=\"color: magenta\">type_name<\/span><span style=\"color: gray\">,\r\n    <\/span><span style=\"color: teal\">oc<\/span><span style=\"color: gray\">.<\/span><span style=\"color: blue\">description\r\nFROM <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_packages <\/span><span style=\"color: teal\">p\r\n<\/span><span style=\"color: gray\">JOIN <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_objects <\/span><span style=\"color: teal\">o\r\n    <\/span><span style=\"color: blue\">ON <\/span><span style=\"color: teal\">p<\/span><span style=\"color: gray\">.<\/span><span style=\"color: blue\">guid <\/span><span style=\"color: gray\">= <\/span><span style=\"color: teal\">o<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">package_guid\r\n<\/span><span style=\"color: gray\">JOIN <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_object_columns <\/span><span style=\"color: teal\">oc\r\n    <\/span><span style=\"color: blue\">ON <\/span><span style=\"color: teal\">o<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">name <\/span><span style=\"color: gray\">= <\/span><span style=\"color: teal\">oc<\/span><span style=\"color: gray\">.<\/span><span style=\"color: magenta\">object_name \r\n        <\/span><span style=\"color: gray\">AND <\/span><span style=\"color: teal\">o<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">package_guid <\/span><span style=\"color: gray\">= <\/span><span style=\"color: teal\">oc<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">object_package_guid\r\n<\/span><span style=\"color: blue\">WHERE <\/span><span style=\"color: gray\">((<\/span><span style=\"color: teal\">p<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">capabilities <\/span><span style=\"color: gray\">is null or <\/span><span style=\"color: teal\">p<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">capabilities <\/span><span style=\"color: gray\">&amp; <\/span>1 <span style=\"color: gray\">= <\/span>0<span style=\"color: gray\">)\r\n  AND (<\/span><span style=\"color: teal\">o<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">capabilities <\/span><span style=\"color: gray\">is null or <\/span><span style=\"color: teal\">o<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">capabilities <\/span><span style=\"color: gray\">&amp; <\/span>1 <span style=\"color: gray\">= <\/span>0<span style=\"color: gray\">)\r\n  AND (<\/span><span style=\"color: teal\">oc<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">capabilities <\/span><span style=\"color: gray\">is null or <\/span><span style=\"color: teal\">oc<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">capabilities <\/span><span style=\"color: gray\">&amp; <\/span>1 <span style=\"color: gray\">= <\/span>0<span style=\"color: gray\">))\r\n  AND <\/span><span style=\"color: teal\">o<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">object_type <\/span><span style=\"color: gray\">= <\/span><span style=\"color: red\">'event'\r\n  <\/span><span style=\"color: gray\">AND <\/span><span style=\"color: teal\">oc<\/span><span style=\"color: gray\">.<\/span><span style=\"color: teal\">column_type <\/span><span style=\"color: gray\">= <\/span><span style=\"color: red\">'customizable'\r\n<\/span><\/pre>\n<\/blockquote>\n<p>If we look at a specific Event containing a customizable column, in this case the sqlserver.file_read_completed Event, we will see that there is a customizable column as well as a data column for the data collected by the customizable column.<\/p>\n<blockquote>\n<pre class=\"code\"><span style=\"color: blue\">SELECT \r\n    <\/span>p<span style=\"color: gray\">.<\/span>name <span style=\"color: blue\">AS <\/span>package_name<span style=\"color: gray\">,\r\n    <\/span>o<span style=\"color: gray\">.<\/span>name <span style=\"color: blue\">AS <\/span>event_name<span style=\"color: gray\">,\r\n    <\/span>oc<span style=\"color: gray\">.<\/span>column_id<span style=\"color: gray\">,\r\n    <\/span>oc<span style=\"color: gray\">.<\/span>name <span style=\"color: blue\">AS <\/span>column_name<span style=\"color: gray\">,\r\n    <\/span>oc<span style=\"color: gray\">.<\/span>column_type<span style=\"color: gray\">,\r\n    <\/span>oc<span style=\"color: gray\">.<\/span><span style=\"color: magenta\">type_name<\/span><span style=\"color: gray\">,\r\n    <\/span>oc<span style=\"color: gray\">.<\/span><span style=\"color: blue\">description\r\nFROM <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_packages <\/span>p\r\n<span style=\"color: gray\">JOIN <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_objects <\/span>o\r\n    <span style=\"color: blue\">ON <\/span>p<span style=\"color: gray\">.<\/span><span style=\"color: blue\">guid <\/span><span style=\"color: gray\">= <\/span>o<span style=\"color: gray\">.<\/span>package_guid\r\n<span style=\"color: gray\">JOIN <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_object_columns <\/span>oc\r\n    <span style=\"color: blue\">ON <\/span>o<span style=\"color: gray\">.<\/span>name <span style=\"color: gray\">= <\/span>oc<span style=\"color: gray\">.<\/span><span style=\"color: magenta\">object_name \r\n        <\/span><span style=\"color: gray\">AND <\/span>o<span style=\"color: gray\">.<\/span>package_guid <span style=\"color: gray\">= <\/span>oc<span style=\"color: gray\">.<\/span>object_package_guid\r\n<span style=\"color: blue\">WHERE <\/span><span style=\"color: gray\">((<\/span>p<span style=\"color: gray\">.<\/span>capabilities <span style=\"color: gray\">is null or <\/span>p<span style=\"color: gray\">.<\/span>capabilities <span style=\"color: gray\">&amp; <\/span>1 <span style=\"color: gray\">= <\/span>0<span style=\"color: gray\">)\r\n  AND (<\/span>o<span style=\"color: gray\">.<\/span>capabilities <span style=\"color: gray\">is null or <\/span>o<span style=\"color: gray\">.<\/span>capabilities <span style=\"color: gray\">&amp; <\/span>1 <span style=\"color: gray\">= <\/span>0<span style=\"color: gray\">)\r\n  AND (<\/span>oc<span style=\"color: gray\">.<\/span>capabilities <span style=\"color: gray\">is null or <\/span>oc<span style=\"color: gray\">.<\/span>capabilities <span style=\"color: gray\">&amp; <\/span>1 <span style=\"color: gray\">= <\/span>0<span style=\"color: gray\">))\r\n  AND <\/span>o<span style=\"color: gray\">.<\/span>object_type <span style=\"color: gray\">= <\/span><span style=\"color: red\">'event'\r\n  <\/span><span style=\"color: gray\">AND <\/span>o<span style=\"color: gray\">.<\/span>name <span style=\"color: gray\">= <\/span><span style=\"color: red\">'file_read_completed'\r\n  <\/span><span style=\"color: gray\">AND <\/span>oc<span style=\"color: gray\">.<\/span>column_type <span style=\"color: gray\">&lt;&gt; <\/span><span style=\"color: red\">'readonly'\r\n<\/span><span style=\"color: blue\">ORDER BY <\/span>oc<span style=\"color: gray\">.<\/span>column_type<span style=\"color: gray\">, <\/span>oc<span style=\"color: gray\">.<\/span>column_id<\/pre>\n<p>  <a href=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windows-live-writer\/anxeventaday19of31usingcustomizablefield\/06e2f1bc\/image.png\" target=\"_blank\"><img fetchpriority=\"high\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windows-live-writer\/anxeventaday19of31usingcustomizablefield\/4cf3aecf\/image_thumb.png\" width=\"626\" height=\"264\" \/><\/a> <\/p><\/blockquote>\n<p>In the red box are the customizable columns, and the blue box has the associated data columns to the customizable columns.&#160; The data columns will exist in the Event data from the Event firing, but they will only have a value in the Event data if the customizable column is set to collect the information.<\/p>\n<blockquote>\n<pre class=\"code\"><span style=\"color: blue\">CREATE EVENT SESSION <\/span>CustomizableColumnDemo\r\n<span style=\"color: blue\">ON SERVER\r\nADD EVENT <\/span>sqlserver<span style=\"color: gray\">.<\/span>file_read_completed\r\n<span style=\"color: gray\">(\r\n    <\/span><span style=\"color: blue\">WHERE <\/span><span style=\"color: gray\">(<\/span>database_id <span style=\"color: gray\">= <\/span>4<span style=\"color: gray\">)    \r\n)\r\n<\/span><span style=\"color: blue\">ADD TARGET <\/span>package0<span style=\"color: gray\">.<\/span>ring_buffer\r\n<span style=\"color: blue\">GO\r\nALTER EVENT SESSION <\/span>CustomizableColumnDemo\r\n<span style=\"color: blue\">ON SERVER\r\nSTATE<\/span><span style=\"color: gray\">=<\/span>START\r\n<span style=\"color: blue\">GO\r\nDBCC <\/span>DROPCLEANBUFFERS\r\n<span style=\"color: blue\">GO\r\nSELECT TOP <\/span>10 <span style=\"color: gray\">* <\/span><span style=\"color: blue\">FROM <\/span>msdb<span style=\"color: gray\">.<\/span>dbo<span style=\"color: gray\">.<\/span>backupset\r\n<span style=\"color: blue\">GO\r\n<\/span><\/pre>\n<\/blockquote>\n<p>If we query the Target data for the above Event, we\u2019ll see that the path and io_data columns are included in the Event XML, but there is no value in the XML nodes.<\/p>\n<blockquote>\n<pre class=\"code\"><span style=\"color: blue\">SELECT <\/span><span style=\"color: magenta\">CAST<\/span><span style=\"color: gray\">(<\/span>target_data <span style=\"color: blue\">AS XML<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>target_data\r\n<span style=\"color: blue\">FROM <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_sessions <\/span><span style=\"color: blue\">AS <\/span>s    \r\n<span style=\"color: gray\">JOIN <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_session_targets <\/span><span style=\"color: blue\">AS <\/span>t\r\n    <span style=\"color: blue\">ON <\/span>s<span style=\"color: gray\">.<\/span><span style=\"color: blue\">address <\/span><span style=\"color: gray\">= <\/span>t<span style=\"color: gray\">.<\/span>event_session_address\r\n<span style=\"color: blue\">WHERE <\/span>s<span style=\"color: gray\">.<\/span>name <span style=\"color: gray\">= <\/span><span style=\"color: red\">'CustomizableColumnDemo'\r\n  <\/span><span style=\"color: gray\">AND <\/span>t<span style=\"color: gray\">.<\/span>target_name <span style=\"color: gray\">= <\/span><span style=\"color: red\">'ring_buffer'\r\n<\/span><\/pre>\n<pre class=\"code\"><span style=\"color: blue\">&lt;<\/span><span style=\"color: #a31515\">event <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">file_read_completed<\/span>&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">sqlserver<\/span>&quot; <span style=\"color: red\">id<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">83<\/span>&quot; <span style=\"color: red\">version<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">1<\/span>&quot; <span style=\"color: red\">timestamp<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">2010-12-20T03:14:20.393Z<\/span>&quot;<span style=\"color: blue\">&gt;\r\n  &lt;<\/span><span style=\"color: #a31515\">data <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">mode<\/span>&quot;<span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">type <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">file_io_mode<\/span>&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">sqlserver<\/span>&quot; <span style=\"color: blue\">\/&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;<\/span>0<span style=\"color: blue\">&lt;\/<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">text<\/span><span style=\"color: blue\">&gt;<\/span>Contiguous<span style=\"color: blue\">&lt;\/<\/span><span style=\"color: #a31515\">text<\/span><span style=\"color: blue\">&gt;\r\n  &lt;\/<\/span><span style=\"color: #a31515\">data<\/span><span style=\"color: blue\">&gt;\r\n  &lt;<\/span><span style=\"color: #a31515\">data <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">duration<\/span>&quot;<span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">type <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">uint64<\/span>&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">package0<\/span>&quot; <span style=\"color: blue\">\/&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;<\/span>0<span style=\"color: blue\">&lt;\/<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">text <\/span><span style=\"color: blue\">\/&gt;\r\n  &lt;\/<\/span><span style=\"color: #a31515\">data<\/span><span style=\"color: blue\">&gt;\r\n  &lt;<\/span><span style=\"color: #a31515\">data <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">file_handle<\/span>&quot;<span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">type <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">ulong_ptr<\/span>&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">package0<\/span>&quot; <span style=\"color: blue\">\/&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;<\/span>0x0000000000000b38<span style=\"color: blue\">&lt;\/<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">text <\/span><span style=\"color: blue\">\/&gt;\r\n  &lt;\/<\/span><span style=\"color: #a31515\">data<\/span><span style=\"color: blue\">&gt;\r\n  &lt;<\/span><span style=\"color: #a31515\">data <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">offset<\/span>&quot;<span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">type <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">uint64<\/span>&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">package0<\/span>&quot; <span style=\"color: blue\">\/&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;<\/span>14352384<span style=\"color: blue\">&lt;\/<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">text <\/span><span style=\"color: blue\">\/&gt;\r\n  &lt;\/<\/span><span style=\"color: #a31515\">data<\/span><span style=\"color: blue\">&gt;\r\n  &lt;<\/span><span style=\"color: #a31515\">data <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">database_id<\/span>&quot;<span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">type <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">uint16<\/span>&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">package0<\/span>&quot; <span style=\"color: blue\">\/&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;<\/span>4<span style=\"color: blue\">&lt;\/<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">text <\/span><span style=\"color: blue\">\/&gt;\r\n  &lt;\/<\/span><span style=\"color: #a31515\">data<\/span><span style=\"color: blue\">&gt;\r\n  &lt;<\/span><span style=\"color: #a31515\">data <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">file_id<\/span>&quot;<span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">type <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">uint16<\/span>&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">package0<\/span>&quot; <span style=\"color: blue\">\/&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;<\/span>1<span style=\"color: blue\">&lt;\/<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">text <\/span><span style=\"color: blue\">\/&gt;\r\n  &lt;\/<\/span><span style=\"color: #a31515\">data<\/span><span style=\"color: blue\">&gt;\r\n  &lt;<\/span><span style=\"color: #a31515\">data <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">file_group_id<\/span>&quot;<span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">type <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">uint16<\/span>&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">package0<\/span>&quot; <span style=\"color: blue\">\/&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;<\/span>1<span style=\"color: blue\">&lt;\/<\/span><span style=\"color: #a31515\">value<\/span><span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">text <\/span><span style=\"color: blue\">\/&gt;\r\n  &lt;\/<\/span><span style=\"color: #a31515\">data<\/span><span style=\"color: blue\">&gt;\r\n  &lt;<\/span><span style=\"color: #a31515\">data <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">path<\/span>&quot;<span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">type <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">unicode_string<\/span>&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">package0<\/span>&quot; <span style=\"color: blue\">\/&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">value <\/span><span style=\"color: blue\">\/&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">text <\/span><span style=\"color: blue\">\/&gt;\r\n  &lt;\/<\/span><span style=\"color: #a31515\">data<\/span><span style=\"color: blue\">&gt;\r\n  &lt;<\/span><span style=\"color: #a31515\">data <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">io_data<\/span>&quot;<span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">type <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">binary_data<\/span>&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;<span style=\"color: blue\">package0<\/span>&quot; <span style=\"color: blue\">\/&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">value <\/span><span style=\"color: blue\">\/&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">text <\/span><span style=\"color: blue\">\/&gt;\r\n  &lt;\/<\/span><span style=\"color: #a31515\">data<\/span><span style=\"color: blue\">&gt;\r\n&lt;\/<\/span><span style=\"color: #a31515\">event<\/span><span style=\"color: blue\">&gt;<\/span><\/pre>\n<\/blockquote>\n<p>To set the customizable column to collect the data, in the ADD EVENT section of the CREATE EVENT SESSION or ALTER EVENT SESSION DDL command, the SET option is used to turn data collection on for the column.<\/p>\n<blockquote>\n<pre class=\"code\"><span style=\"color: blue\">DROP EVENT SESSION <\/span>CustomizableColumnDemo\r\n<span style=\"color: blue\">ON SERVER\r\nGO\r\nCREATE EVENT SESSION <\/span>CustomizableColumnDemo\r\n<span style=\"color: blue\">ON SERVER\r\nADD EVENT <\/span>sqlserver<span style=\"color: gray\">.<\/span>file_read_completed\r\n<span style=\"color: gray\">(    \r\n    <\/span><span style=\"color: blue\">SET <\/span>collect_path <span style=\"color: gray\">= <\/span>1\r\n    <span style=\"color: blue\">WHERE<\/span><span style=\"color: gray\">(<\/span>database_id <span style=\"color: gray\">= <\/span>4<span style=\"color: gray\">)\r\n)\r\n<\/span><span style=\"color: blue\">ADD TARGET <\/span>package0<span style=\"color: gray\">.<\/span>ring_buffer\r\n<span style=\"color: blue\">GO\r\nALTER EVENT SESSION <\/span>CustomizableColumnDemo\r\n<span style=\"color: blue\">ON SERVER\r\nSTATE<\/span><span style=\"color: gray\">=<\/span>START\r\n<span style=\"color: blue\">GO\r\nDBCC <\/span>DROPCLEANBUFFERS\r\n<span style=\"color: blue\">GO\r\nSELECT TOP <\/span>10 <span style=\"color: gray\">* <\/span><span style=\"color: blue\">FROM <\/span>msdb<span style=\"color: gray\">.<\/span>dbo<span style=\"color: gray\">.<\/span>backupset\r\n<span style=\"color: blue\">GO\r\nALTER EVENT SESSION <\/span>CustomizableColumnDemo\r\n<span style=\"color: blue\">ON SERVER\r\nDROP EVENT <\/span>sqlserver<span style=\"color: gray\">.<\/span>file_read_completed\r\n<span style=\"color: blue\">GO<\/span><\/pre>\n<\/blockquote>\n<p>Notice that the SET option does not use parenthesis, they are not allowed in the DDL definition.&#160; By setting the collect_path customizable column to 1 the Event XML now contains the path to the data file that was read.<\/p>\n<blockquote>\n<pre class=\"code\"><span style=\"color: green\">-- Query the XML to get the Target Data\r\n<\/span><span style=\"color: blue\">SELECT \r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/@name)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'varchar(50)'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">AS <\/span>event_name<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/@package)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'varchar(50)'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">AS <\/span>package_name<span style=\"color: gray\">,\r\n    <\/span><span style=\"color: magenta\">DATEADD<\/span><span style=\"color: gray\">(<\/span>hh<span style=\"color: gray\">, \r\n            <\/span><span style=\"color: magenta\">DATEDIFF<\/span><span style=\"color: gray\">(<\/span>hh<span style=\"color: gray\">, <\/span><span style=\"color: magenta\">GETUTCDATE<\/span><span style=\"color: gray\">(), <\/span><span style=\"color: magenta\">CURRENT_TIMESTAMP<\/span><span style=\"color: gray\">), \r\n            <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/@timestamp)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'datetime2'<\/span><span style=\"color: gray\">)) <\/span><span style=\"color: blue\">AS <\/span>[timestamp]<span style=\"color: gray\">,\r\n    <\/span><span style=\"color: magenta\">ISNULL<\/span><span style=\"color: gray\">(<\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;database_id&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">),\r\n            <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/action[@name=&quot;database_id&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">)) <\/span><span style=\"color: blue\">as <\/span>[database_id]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;mode&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'nvarchar(50)'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[mode]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;duration&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'bigint'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[duration]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;file_handle&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'nvarchar(50)'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[file_handle]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;offset&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[offset]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;file_id&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[file_id]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;path&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'nvarchar(250)'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[path]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;id_data&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'nvarchar(max)'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[io_data]   \r\n<span style=\"color: blue\">FROM\r\n<\/span><span style=\"color: gray\">(    <\/span><span style=\"color: blue\">SELECT <\/span>td<span style=\"color: gray\">.<\/span>query<span style=\"color: gray\">(<\/span><span style=\"color: red\">'.'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>n\r\n    <span style=\"color: blue\">FROM \r\n    <\/span><span style=\"color: gray\">(\r\n        <\/span><span style=\"color: blue\">SELECT <\/span><span style=\"color: magenta\">CAST<\/span><span style=\"color: gray\">(<\/span>target_data <span style=\"color: blue\">AS XML<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>target_data\r\n        <span style=\"color: blue\">FROM <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_sessions <\/span><span style=\"color: blue\">AS <\/span>s    \r\n        <span style=\"color: gray\">JOIN <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_session_targets <\/span><span style=\"color: blue\">AS <\/span>t\r\n            <span style=\"color: blue\">ON <\/span>s<span style=\"color: gray\">.<\/span><span style=\"color: blue\">address <\/span><span style=\"color: gray\">= <\/span>t<span style=\"color: gray\">.<\/span>event_session_address\r\n        <span style=\"color: blue\">WHERE <\/span>s<span style=\"color: gray\">.<\/span>name <span style=\"color: gray\">= <\/span><span style=\"color: red\">'CustomizableColumnDemo'\r\n          <\/span><span style=\"color: gray\">AND <\/span>t<span style=\"color: gray\">.<\/span>target_name <span style=\"color: gray\">= <\/span><span style=\"color: red\">'ring_buffer'\r\n    <\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">AS <\/span>sub\r\n    <span style=\"color: gray\">CROSS APPLY <\/span>target_data<span style=\"color: gray\">.<\/span>nodes<span style=\"color: gray\">(<\/span><span style=\"color: red\">'RingBufferTarget\/event'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">AS <\/span>q<span style=\"color: gray\">(<\/span>td<span style=\"color: gray\">)\r\n) <\/span><span style=\"color: blue\">as <\/span>tab\r\n<span style=\"color: blue\">GO<\/span><\/pre>\n<\/blockquote>\n<blockquote>\n<p><a href=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windows-live-writer\/anxeventaday19of31usingcustomizablefield\/7e12e96f\/image.png\" target=\"_blank\"><img decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windows-live-writer\/anxeventaday19of31usingcustomizablefield\/0f171753\/image_thumb.png\" width=\"644\" height=\"122\" \/><\/a> <\/p>\n<\/blockquote>\n<p>The increase in the number of Events with customizable columns in Denali CTP1 is, in my own opinion, a great step in the right direction for Extended Events.&#160; The use of customizable columns to add data into the Event payload extends the flexibility of Extended Events by providing a mechanism to gather additional data related to Events that is specific to the Event and not globally available like Actions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today\u2019s post will be somewhat short, but we\u2019ll look at Customizable Fields on Events in Extended Events and how they are used to collect additional information.&#160; Customizable Fields generally represent information of potential interest that may be expensive to collect, and is therefore made available for collection if specified by the Event Session.&#160; In SQL [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,38,40,45],"tags":[],"class_list":["post-545","post","type-post","status-publish","format-standard","hentry","category-extended-events","category-sql-server-2008","category-sql-server-denali","category-xevent-a-day-series"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>An XEvent a Day (19 of 31) \u2013 Using Customizable Fields - Jonathan Kehayias<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"An XEvent a Day (19 of 31) \u2013 Using Customizable Fields - Jonathan Kehayias\" \/>\n<meta property=\"og:description\" content=\"Today\u2019s post will be somewhat short, but we\u2019ll look at Customizable Fields on Events in Extended Events and how they are used to collect additional information.&#160; Customizable Fields generally represent information of potential interest that may be expensive to collect, and is therefore made available for collection if specified by the Event Session.&#160; In SQL [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/\" \/>\n<meta property=\"og:site_name\" content=\"Jonathan Kehayias\" \/>\n<meta property=\"article:published_time\" content=\"2010-12-19T23:15:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-13T16:16:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windows-live-writer\/anxeventaday19of31usingcustomizablefield\/4cf3aecf\/image_thumb.png\" \/>\n<meta name=\"author\" content=\"Jonathan Kehayias\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jonathan Kehayias\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/\"},\"author\":{\"name\":\"Jonathan Kehayias\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/#\\\/schema\\\/person\\\/01c10d94f3648654ef706d5e6305f69c\"},\"headline\":\"An XEvent a Day (19 of 31) \u2013 Using Customizable Fields\",\"datePublished\":\"2010-12-19T23:15:00+00:00\",\"dateModified\":\"2017-04-13T16:16:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/\"},\"wordCount\":387,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.SQLskills.com\\\/blogs\\\/jonathan\\\/wp-content\\\/uploads\\\/windows-live-writer\\\/anxeventaday19of31usingcustomizablefield\\\/4cf3aecf\\\/image_thumb.png\",\"articleSection\":[\"Extended Events\",\"SQL Server 2008\",\"SQL Server Denali\",\"XEvent a Day Series\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/\",\"url\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/\",\"name\":\"An XEvent a Day (19 of 31) \u2013 Using Customizable Fields - Jonathan Kehayias\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.SQLskills.com\\\/blogs\\\/jonathan\\\/wp-content\\\/uploads\\\/windows-live-writer\\\/anxeventaday19of31usingcustomizablefield\\\/4cf3aecf\\\/image_thumb.png\",\"datePublished\":\"2010-12-19T23:15:00+00:00\",\"dateModified\":\"2017-04-13T16:16:38+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/#\\\/schema\\\/person\\\/01c10d94f3648654ef706d5e6305f69c\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.SQLskills.com\\\/blogs\\\/jonathan\\\/wp-content\\\/uploads\\\/windows-live-writer\\\/anxeventaday19of31usingcustomizablefield\\\/4cf3aecf\\\/image_thumb.png\",\"contentUrl\":\"https:\\\/\\\/www.SQLskills.com\\\/blogs\\\/jonathan\\\/wp-content\\\/uploads\\\/windows-live-writer\\\/anxeventaday19of31usingcustomizablefield\\\/4cf3aecf\\\/image_thumb.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-19-of-31-using-customizable-fields\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extended Events\",\"item\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/category\\\/extended-events\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"An XEvent a Day (19 of 31) \u2013 Using Customizable Fields\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/#website\",\"url\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/\",\"name\":\"Jonathan Kehayias - The Rambling DBA\",\"description\":\"The Rambling DBA\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/#\\\/schema\\\/person\\\/01c10d94f3648654ef706d5e6305f69c\",\"name\":\"Jonathan Kehayias\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/86630e27f5deecc5c393ea57fc7c3b6a068949f4fd6b5309f81de5a276f12855?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/86630e27f5deecc5c393ea57fc7c3b6a068949f4fd6b5309f81de5a276f12855?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/86630e27f5deecc5c393ea57fc7c3b6a068949f4fd6b5309f81de5a276f12855?s=96&d=mm&r=g\",\"caption\":\"Jonathan Kehayias\"},\"sameAs\":[\"http:\\\/\\\/3.209.169.194\\\/blogs\\\/jonathan\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"An XEvent a Day (19 of 31) \u2013 Using Customizable Fields - Jonathan Kehayias","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/","og_locale":"en_US","og_type":"article","og_title":"An XEvent a Day (19 of 31) \u2013 Using Customizable Fields - Jonathan Kehayias","og_description":"Today\u2019s post will be somewhat short, but we\u2019ll look at Customizable Fields on Events in Extended Events and how they are used to collect additional information.&#160; Customizable Fields generally represent information of potential interest that may be expensive to collect, and is therefore made available for collection if specified by the Event Session.&#160; In SQL [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/","og_site_name":"Jonathan Kehayias","article_published_time":"2010-12-19T23:15:00+00:00","article_modified_time":"2017-04-13T16:16:38+00:00","og_image":[{"url":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windows-live-writer\/anxeventaday19of31usingcustomizablefield\/4cf3aecf\/image_thumb.png","type":"","width":"","height":""}],"author":"Jonathan Kehayias","twitter_misc":{"Written by":"Jonathan Kehayias","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/#article","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/"},"author":{"name":"Jonathan Kehayias","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/#\/schema\/person\/01c10d94f3648654ef706d5e6305f69c"},"headline":"An XEvent a Day (19 of 31) \u2013 Using Customizable Fields","datePublished":"2010-12-19T23:15:00+00:00","dateModified":"2017-04-13T16:16:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/"},"wordCount":387,"commentCount":0,"image":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windows-live-writer\/anxeventaday19of31usingcustomizablefield\/4cf3aecf\/image_thumb.png","articleSection":["Extended Events","SQL Server 2008","SQL Server Denali","XEvent a Day Series"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/","url":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/","name":"An XEvent a Day (19 of 31) \u2013 Using Customizable Fields - Jonathan Kehayias","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/#primaryimage"},"image":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windows-live-writer\/anxeventaday19of31usingcustomizablefield\/4cf3aecf\/image_thumb.png","datePublished":"2010-12-19T23:15:00+00:00","dateModified":"2017-04-13T16:16:38+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/#\/schema\/person\/01c10d94f3648654ef706d5e6305f69c"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/#primaryimage","url":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windows-live-writer\/anxeventaday19of31usingcustomizablefield\/4cf3aecf\/image_thumb.png","contentUrl":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windows-live-writer\/anxeventaday19of31usingcustomizablefield\/4cf3aecf\/image_thumb.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-19-of-31-using-customizable-fields\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/"},{"@type":"ListItem","position":2,"name":"Extended Events","item":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/category\/extended-events\/"},{"@type":"ListItem","position":3,"name":"An XEvent a Day (19 of 31) \u2013 Using Customizable Fields"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/","name":"Jonathan Kehayias - The Rambling DBA","description":"The Rambling DBA","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/#\/schema\/person\/01c10d94f3648654ef706d5e6305f69c","name":"Jonathan Kehayias","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/86630e27f5deecc5c393ea57fc7c3b6a068949f4fd6b5309f81de5a276f12855?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/86630e27f5deecc5c393ea57fc7c3b6a068949f4fd6b5309f81de5a276f12855?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/86630e27f5deecc5c393ea57fc7c3b6a068949f4fd6b5309f81de5a276f12855?s=96&d=mm&r=g","caption":"Jonathan Kehayias"},"sameAs":["http:\/\/3.209.169.194\/blogs\/jonathan"]}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/posts\/545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/comments?post=545"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/posts\/545\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/media?parent=545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/categories?post=545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/tags?post=545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}