{"id":5370,"date":"2018-04-30T14:16:47","date_gmt":"2018-04-30T13:16:47","guid":{"rendered":"http:\/\/andreas-wolter.com\/?p=5370"},"modified":"2025-09-14T21:20:58","modified_gmt":"2025-09-15T02:20:58","slug":"1804-tracing-with-extended-events-in-azure-sql-database","status":"publish","type":"post","link":"https:\/\/andreas-wolter.com\/en\/1804-tracing-with-extended-events-in-azure-sql-database\/","title":{"rendered":"Tracing with XEvents in Azure SQL Database"},"content":{"rendered":"\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_heading-efe9fef15c37665b41f1be71855e0ea6\">\n#top .av-special-heading.av-av_heading-efe9fef15c37665b41f1be71855e0ea6{\npadding-bottom:10px;\n}\nbody .av-special-heading.av-av_heading-efe9fef15c37665b41f1be71855e0ea6 .av-special-heading-tag .heading-char{\nfont-size:25px;\n}\n.av-special-heading.av-av_heading-efe9fef15c37665b41f1be71855e0ea6 .av-subheading{\nfont-size:15px;\n}\n<\/style>\n<div  class='av-special-heading av-av_heading-efe9fef15c37665b41f1be71855e0ea6 av-special-heading-h3 blockquote modern-quote  avia-builder-el-0  el_before_av_textblock  avia-builder-el-first '><h3 class='av-special-heading-tag'  itemprop=\"headline\"  >Tracing with XEvents in Azure SQL Database<\/h3><div class='av-subheading av-subheading_below'><p>A step-by-step guide.<\/p>\n<\/div><div class=\"special-heading-border\"><div class=\"special-heading-inner-border\"><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>Being Developer, Administrator or simply Support for an Azure SQL Database based Application, there are those moments when the Azure-provided Dashboard-capabilities are not sufficient and you need to conduct a throughout trace of certain statements occurring.<!--more--><\/p>\n<p>Sometimes you will need:<\/p>\n<ul>\n<li>superior filtering in the source<\/li>\n<\/ul>\n<p>and the ability to<\/p>\n<ul>\n<li>group<\/li>\n<li>aggregate<\/li>\n<li>dice\/filtering in the collected data<\/li>\n<\/ul>\n<p>..your data to find problematic queries.<\/p>\n<p>Or you are interested in events that may not be the queries themselves to answer questions like for example:<\/p>\n<\/div><\/section>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><ul>\n<li>\u201cWhat prevented adaptive query plan usage?\u201d\n<ul>\n<li>Event: adaptive_join_skipped<\/li>\n<\/ul>\n<\/li>\n<li>\u201chow exactly did the tuple mover process for my columnstore Index run?\u201d\n<ul>\n<li>Possibly interesting events:\n<ul>\n<li>columnstore_tuple_mover_begin_compress<\/li>\n<li>columnstore_tuple_mover_begin_delete_buffer_flush<\/li>\n<li>columnstore_tuple_mover_compression_stats<\/li>\n<li>columnstore_tuple_mover_delete_buffer_flush_requirements_not_met<\/li>\n<li>columnstore_tuple_mover_delete_buffer_truncate_requirements_not_met<\/li>\n<li>columnstore_tuple_mover_delete_buffer_truncate_timed_out<\/li>\n<li>columnstore_tuple_mover_delete_buffer_truncated<\/li>\n<li>columnstore_tuple_mover_delete_buffers_swapped<\/li>\n<li>columnstore_tuple_mover_end_compress<\/li>\n<li>columnstore_tuple_mover_end_delete_buffer_flush<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>or when did the garbage collector of my memory optimized table occur and how many rows did it remove?\u201d\n<ul>\n<li>Possibly interesting events:\n<ul>\n<li>gc_base_generation_evaluation<\/li>\n<li>gc_base_generation_updated<\/li>\n<li>gc_cycle_completed<\/li>\n<li>gc_notification<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>If you hoped to use SQLTrace\/Profiler for Tracing, from looking at this list alone you can tell there is no way for this old, outdated tool from the last decade in Azure SQL Database. \ud83d\ude09<\/p>\n<\/div><\/section>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>(yes, a bit harsh, but it helps to remember that XEvents were introduced back in SQL 2008 and the SQLTrace technology has been in a coma waiting to get unplugged from life-support since SQL 2012 when XE received a superior GUI and all missing Events. You can read more here: <a href=\"https:\/\/andreas-wolter.com\/en\/extended-events-vs-sql-trace\/\">andreas-wolter.com\/en\/extended-events-vs-sql-trace\/<\/a> )<\/p>\n<p>First conclusion: <strong>The architecture of SQLTrace is simply not supported in Azure SQL DB<\/strong>.<\/p>\n<p>So, <strong>on to Extended Events.<\/strong><\/p>\n<p>When you are connected via SQL Server Management Studio to your Azure-hosted Database, you will see \u201cExtended Events\u201d inside the database-scope<\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-bccb26076ed1aff0d8d12d41cc4919be\">\n.avia-image-container.av-av_image-bccb26076ed1aff0d8d12d41cc4919be img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-bccb26076ed1aff0d8d12d41cc4919be .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-bccb26076ed1aff0d8d12d41cc4919be av-styling- avia-align-center  avia-builder-el-4  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5372 avia-img-lazy-loading-not-5372 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Node_Azure.jpg\" alt='' title='1804_XEvents_Node_Azure'  height=\"289\" width=\"221\"  itemprop=\"thumbnailUrl\"  \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>From there you can use the GUI to create your session, just as on-premise.<\/p>\n<p>You will notice that the option to start the live target viewer is greyed out. That\u2019s because this target, not even the plain \u201cevent_stream\u201d and \u201ccompressed_history\u201d-targets, isn&#8217;t supported in Azure.<\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-5240cc65d17522e28f3344daf9dcc722\">\n.avia-image-container.av-av_image-5240cc65d17522e28f3344daf9dcc722 img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-5240cc65d17522e28f3344daf9dcc722 .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-5240cc65d17522e28f3344daf9dcc722 av-styling- avia-align-center  avia-builder-el-6  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5375 avia-img-lazy-loading-not-5375 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Manual.jpg\" alt='' title='1804_XEvents_Session_Manual'  height=\"545\" width=\"971\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Manual.jpg 971w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Manual-600x337.jpg 600w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Manual-300x168.jpg 300w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Manual-768x431.jpg 768w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Manual-705x396.jpg 705w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Manual-450x253.jpg 450w\" sizes=\"(max-width: 971px) 100vw, 971px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>Causality tracking, which is based on certain private \u201cactions,\u201d is supported though.<\/p>\n<p>You may also notice that less templates than on-premise are included. Mainly the \u201cProfiler-equivalents\u201d but also some others are missing.<\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-f55c37605361ade6578984a8c35a8640\">\n.avia-image-container.av-av_image-f55c37605361ade6578984a8c35a8640 img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-f55c37605361ade6578984a8c35a8640 .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-f55c37605361ade6578984a8c35a8640 av-styling- avia-align-center  avia-builder-el-8  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5377 avia-img-lazy-loading-not-5377 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Templates.jpg\" alt='' title='1804_XEvents_Session_Templates'  height=\"258\" width=\"745\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Templates.jpg 745w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Templates-600x208.jpg 600w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Templates-300x104.jpg 300w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Templates-705x244.jpg 705w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Templates-450x156.jpg 450w\" sizes=\"(max-width: 745px) 100vw, 745px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>But who cares\u2026 I myself have never used any of them since they were introduced back in SQL Server 2012. The DDL is already so simple to use.<\/p>\n<p>Next you decide for your events, filters, and if necessary, actions.<\/p>\n<p>At the time of this writing, the last Update of SQL Azure DB from March 27\/2018 offers 343 traceable events.<\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-4b41df01b3b0a707cc412920389088cc\">\n.avia-image-container.av-av_image-4b41df01b3b0a707cc412920389088cc img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-4b41df01b3b0a707cc412920389088cc .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-4b41df01b3b0a707cc412920389088cc av-styling- avia-align-center  avia-builder-el-10  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5379 avia-img-lazy-loading-not-5379 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Number_XEvents_Azure_SQLServer.jpg\" alt='' title='1804_Number_XEvents_Azure_SQLServer'  height=\"108\" width=\"727\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Number_XEvents_Azure_SQLServer.jpg 727w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Number_XEvents_Azure_SQLServer-600x89.jpg 600w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Number_XEvents_Azure_SQLServer-300x45.jpg 300w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Number_XEvents_Azure_SQLServer-705x105.jpg 705w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Number_XEvents_Azure_SQLServer-450x67.jpg 450w\" sizes=\"(max-width: 727px) 100vw, 727px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>The interesting part about the filters\/predicates is, that there are a couple of <strong>Azure-specific predicate<\/strong>s, from the \u201csqlazure\u201d-package:<\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-f92a190f9a05a675bb67e4409ab73bf6\">\n.avia-image-container.av-av_image-f92a190f9a05a675bb67e4409ab73bf6 img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-f92a190f9a05a675bb67e4409ab73bf6 .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-f92a190f9a05a675bb67e4409ab73bf6 av-styling- avia-align-center  avia-builder-el-12  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5381 avia-img-lazy-loading-not-5381 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Predicates.jpg\" alt='' title='1804_XEvents_Session_Predicates'  height=\"430\" width=\"475\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Predicates.jpg 475w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Predicates-300x272.jpg 300w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_XEvents_Session_Predicates-450x407.jpg 450w\" sizes=\"(max-width: 475px) 100vw, 475px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>The <strong>list of special azure-predicates<\/strong> as of today is:<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"167\"><strong>Predicate<\/strong><\/td>\n<td width=\"313\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"167\">logical_database_name<\/td>\n<td width=\"313\">Get current database name.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">logical_server_name<\/td>\n<td width=\"313\">Get current server name.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">is_azure_connection<\/td>\n<td width=\"313\">Get whether current session is an azure connection.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">is_managed_instance<\/td>\n<td width=\"313\">Get whether this is Managed Instance.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">local_partition_id<\/td>\n<td width=\"313\">Get the current local partition id.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">app_name<\/td>\n<td width=\"313\">Get the app name of the current partition.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">table_group_name<\/td>\n<td width=\"313\">Get the table group name of the current partition.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">low_key<\/td>\n<td width=\"313\">Get the low key of the current partition.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">high_key<\/td>\n<td width=\"313\">Get the high key of the current partition.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">worker_last_error_number<\/td>\n<td width=\"313\">Get the last error number from the current worker.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">logical_database_guid<\/td>\n<td width=\"313\">Get current database logical GUID.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">physical_database_guid<\/td>\n<td width=\"313\">Get current database physical GUID.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">instance_partition_id<\/td>\n<td width=\"313\">Get current sqlserver instance winfab partition id.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">instance_replica_id<\/td>\n<td width=\"313\">Get current sqlserver instance winfab replica id.<\/td>\n<\/tr>\n<tr>\n<td width=\"167\">instance_rg_size<\/td>\n<td width=\"313\">Collect instance RG container size.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Those can come in very handy!<\/p>\n<p>Then you will need to decide for a target. Here we are really limited: All that we can choose from is:<\/p>\n<ul>\n<li>event_file<\/li>\n<li>event_counter<\/li>\n<li>ring_buffer<\/li>\n<\/ul>\n<\/div><\/section>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>Now I am not sure this choice makes a lot of sense. Why the <em>event_counter<\/em>-target, why not <em>histogram<\/em> or <em>pair_matching<\/em>? From the extensive benchmarks I have done (<a href=\"https:\/\/andreas-wolter.com\/en\/performance-overhead-of-tracing-with-extended-event-targets-vs-sql-trace-under-cpu-load\/\">Performance overhead of tracing with Extended Event targets vs SQL Trace under CPU Load<\/a>), I know that the counter-target really does not have any less overhead than the file-target. And also, technically a file-target can easily give you a count. What I do not understand is, why Microsoft did not provide the <em>pair_matching<\/em> target. That one has capabilities that no other target has! And it\u2019s not more complicated to support. I can only guess that this was based on real-world usage, and I find very few people who actually know about that special target\u2019s advantages. Too bad.<\/p>\n<p>The Ring-Buffer target can be parsed for further analysis via XQuery. I have an example here: <a href=\"https:\/\/andreas-wolter.com\/en\/how-to-import-extended-events-session-event_file-target\/\">How to import Extended Events session event_file target and parse deadlock-graph<\/a><\/p>\n<p><strong>The File-Target in Azure SQL Database<\/strong><\/p>\n<p>While the file-target is the easiest one to use on Premise, in Azure SQL Database there are some obstacles. This is because you do not have a concept of local storage.<\/p>\n<p>You need to use a path to a storage container. And for that you need a <strong><em>Storage Account<\/em><\/strong> and somehow allow the database to write to it.<\/p>\n<\/div><\/section>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p><strong>The steps to set up a file-target are:<\/strong><\/p>\n<ol>\n<li>Set up a storage account<\/li>\n<li>Create a container\n<ol>\n<li>a. Get path<\/li>\n<li>b. Get Shared Access Signature (rwl)<\/li>\n<\/ol>\n<\/li>\n<li>On the Azure SQL DB create a master encryption key<\/li>\n<li>Create credentials in the database to access the storage account<\/li>\n<li>Configure Extended event session with the complete target URL<\/li>\n<li>Start the session<\/li>\n<li>Analyze the data<\/li>\n<\/ol>\n<p><strong>Step 1) Set up a storage account<\/strong><\/p>\n<p>For all of this you can use Powershell.<br \/>\nBut I am going to show the manual approach via the Azure Portal. There you go to storage accounts and create a new one. Make sure to select \u201c<strong>general purpose v2<\/strong>\u201d and not v1 storage. For the other options chose your individual needs.<\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-07c1e44ae7195ad74d7eb46cac84ff02\">\n.avia-image-container.av-av_image-07c1e44ae7195ad74d7eb46cac84ff02 img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-07c1e44ae7195ad74d7eb46cac84ff02 .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-07c1e44ae7195ad74d7eb46cac84ff02 av-styling- avia-align-center  avia-builder-el-16  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5384 avia-img-lazy-loading-not-5384 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_create_Storage_Account.jpg\" alt='' title='1804_Azure_create_Storage_Account'  height=\"982\" width=\"312\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_create_Storage_Account.jpg 312w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_create_Storage_Account-95x300.jpg 95w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_create_Storage_Account-224x705.jpg 224w\" sizes=\"(max-width: 312px) 100vw, 312px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p><strong>Step 2) Create a Container<\/strong><\/p>\n<p>Inside the storage account you have the option to create containers:<\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-0709480a96af99f6ba159358b9ee2f3a\">\n.avia-image-container.av-av_image-0709480a96af99f6ba159358b9ee2f3a img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-0709480a96af99f6ba159358b9ee2f3a .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-0709480a96af99f6ba159358b9ee2f3a av-styling- avia-align-center  avia-builder-el-18  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5386 avia-img-lazy-loading-not-5386 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_create_Container.jpg\" alt='' title='1804_Azure_create_Container'  height=\"263\" width=\"674\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_create_Container.jpg 674w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_create_Container-600x234.jpg 600w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_create_Container-300x117.jpg 300w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_create_Container-450x176.jpg 450w\" sizes=\"(max-width: 674px) 100vw, 674px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>Once this is done you need to:<\/p>\n<p><strong>Get Path and Shared Access Signature<\/strong><\/p>\n<p>From here on I suggest you use <a href=\"https:\/\/azure.microsoft.com\/en-us\/features\/storage-explorer\/\" target=\"_blank\" rel=\"noopener\">Azure Storage Explorer<\/a> \u2013 or Powershell altogether to create further folders (optionally) and get the <em>Shared Access Signature<\/em> (SAS)<\/p>\n<p>In Storage Explorer you can right-click on the container and take it from there:<\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-033f6fcc72519bb4a88197e6acc8ebc8\">\n.avia-image-container.av-av_image-033f6fcc72519bb4a88197e6acc8ebc8 img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-033f6fcc72519bb4a88197e6acc8ebc8 .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-033f6fcc72519bb4a88197e6acc8ebc8 av-styling- avia-align-center  avia-builder-el-20  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5388 avia-img-lazy-loading-not-5388 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Explorer_container_properties.jpg\" alt='' title='1804_Azure_Explorer_container_properties'  height=\"242\" width=\"450\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Explorer_container_properties.jpg 450w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Explorer_container_properties-300x161.jpg 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>Create the Access Policy and get the Shared Access Signature:<\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-ea67bf56baf73cd0c4caee355cdf7224\">\n.avia-image-container.av-av_image-ea67bf56baf73cd0c4caee355cdf7224 img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-ea67bf56baf73cd0c4caee355cdf7224 .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-ea67bf56baf73cd0c4caee355cdf7224 av-styling- avia-align-center  avia-builder-el-22  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5394 avia-img-lazy-loading-not-5394 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Storage_Explorer_Access_Policy.jpg\" alt='' title='1804_Azure_Storage_Explorer_Access_Policy'  height=\"340\" width=\"450\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Storage_Explorer_Access_Policy.jpg 450w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Storage_Explorer_Access_Policy-300x227.jpg 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>Permissions: rwl<\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-a8d858c572ced6597ea588e6d4844ebc\">\n.avia-image-container.av-av_image-a8d858c572ced6597ea588e6d4844ebc img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-a8d858c572ced6597ea588e6d4844ebc .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-a8d858c572ced6597ea588e6d4844ebc av-styling- avia-align-center  avia-builder-el-24  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5390 avia-img-lazy-loading-not-5390 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Explorer_get_Shared_Access_Signature.jpg\" alt='' title='1804_Azure_Explorer_get_Shared_Access_Signature'  height=\"272\" width=\"450\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Explorer_get_Shared_Access_Signature.jpg 450w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Explorer_get_Shared_Access_Signature-300x181.jpg 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>Besides the URL you need the string <u>after the question mark<\/u>, which is your <u>Shared Access Key<\/u>. It will look similar to this:<\/p>\n<p>st=2018-04-07T17%3A00%3A00Z&#038;se=2018-06-10T13%3A45%3A00Z&#038;sp=rwl&#038;sv=2017-04-17&#038;sr=c&#038;sig=XDQNl%2BLg7aTadsdwSk9zFT2Ri127Ad1v%2Fg59yJfRR2mE%3D<\/p>\n<p>Once you have that you can go back to SSMS<\/p>\n<p><strong>Step 3) Create a Master Encryption Key<\/strong><\/p>\n<p>Before we can create a Credential with the Shared Access Key, we need to have a database master key to protect that entity.<\/p>\n<p>You create a master key with this simple command:<\/p>\n<p><span style=\"color: #0000ff;\">CREATE MASTER KEY<\/span><\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-ed53c7802390816a6b54157db153580d\">\n.avia-image-container.av-av_image-ed53c7802390816a6b54157db153580d img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-ed53c7802390816a6b54157db153580d .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-ed53c7802390816a6b54157db153580d av-styling- avia-align-center  avia-builder-el-26  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5397 avia-img-lazy-loading-not-5397 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_Master_key.jpg\" alt='' title='1804_Azure_SQL_DB_Master_key'  height=\"191\" width=\"650\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_Master_key.jpg 650w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_Master_key-600x176.jpg 600w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_Master_key-300x88.jpg 300w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_Master_key-450x132.jpg 450w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>You do not need to specify a password for our purposes. This server is managed by the Microsoft Azure platform.<\/p>\n<p><strong>Step 4) Create a Credential<\/strong><\/p>\n<p>Now we need to create the Credential which will contain the Shared Access Signature to access our prepared storage account.<br \/>\nNote: This command will only work on Azure SQL DB:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-5399 size-full\" src=\"http:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/Create_Database_Scoped_Credential_screenshot.png\" alt=\"\" width=\"546\" height=\"95\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/Create_Database_Scoped_Credential_screenshot.png 546w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/Create_Database_Scoped_Credential_screenshot-300x52.png 300w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/Create_Database_Scoped_Credential_screenshot-450x78.png 450w\" sizes=\"auto, (max-width: 546px) 100vw, 546px\" \/><\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-a94f15ee99d62d9a810542c49a46165e\">\n.avia-image-container.av-av_image-a94f15ee99d62d9a810542c49a46165e img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-a94f15ee99d62d9a810542c49a46165e .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-a94f15ee99d62d9a810542c49a46165e av-styling- avia-align-center  avia-builder-el-28  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5401 avia-img-lazy-loading-not-5401 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_create_Credential.jpg\" alt='' title='1804_Azure_SQL_DB_create_Credential'  height=\"290\" width=\"1218\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_create_Credential.jpg 1218w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_create_Credential-600x143.jpg 600w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_create_Credential-300x71.jpg 300w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_create_Credential-768x183.jpg 768w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_create_Credential-1030x245.jpg 1030w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_create_Credential-705x168.jpg 705w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_create_Credential-450x107.jpg 450w\" sizes=\"(max-width: 1218px) 100vw, 1218px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>As you can see you can create multiple Credentials on your database.<\/p>\n<p><strong>Step 5) Configure Extended event session<\/strong><\/p>\n<p>You enter the filename in the format https:\/\/StorageAccount.blob.core.windows.net\/Container\/FileName.xel<\/p>\n<p>I would advise to include the Database-name in the Filename, unless you want to have a container for each. So in my example it will be: <a href=\"https:\/\/sarpedonstore.blob.core.windows.net\/azuredemos\/xetrace\/Workload_DB_XE_Azure_Demo.xel\" target=\"_blank\" rel=\"noopener\">https:\/\/sarpedonstore.blob.core.windows.net\/azuredemos\/xetrace\/Workload_DB_XE_Azure_Demo.xel<\/a><\/p>\n<p>In the GUI you can see the Credentials that exist:<\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-8867f28690c20817dc47ba5de827e7fc\">\n.avia-image-container.av-av_image-8867f28690c20817dc47ba5de827e7fc img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-8867f28690c20817dc47ba5de827e7fc .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-8867f28690c20817dc47ba5de827e7fc av-styling- avia-align-center  avia-builder-el-30  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5403 avia-img-lazy-loading-not-5403 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_Extended_Event_File_Target.jpg\" alt='' title='1804_Azure_SQL_DB_Extended_Event_File_Target'  height=\"453\" width=\"600\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_Extended_Event_File_Target.jpg 600w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_Extended_Event_File_Target-300x227.jpg 300w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_Extended_Event_File_Target-450x340.jpg 450w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>The DDL-statement for the session looks like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-5405\" src=\"http:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/Create_Event_Session_screenshot.png\" alt=\"\" width=\"639\" height=\"133\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/Create_Event_Session_screenshot.png 639w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/Create_Event_Session_screenshot-600x125.png 600w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/Create_Event_Session_screenshot-300x62.png 300w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/Create_Event_Session_screenshot-450x94.png 450w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_hr-1deae294de86921cadf9622fb2da0879\">\n#top .hr.hr-invisible.av-av_hr-1deae294de86921cadf9622fb2da0879{\nheight:25px;\n}\n<\/style>\n<div  class='hr av-av_hr-1deae294de86921cadf9622fb2da0879 hr-invisible  avia-builder-el-32  el_after_av_textblock  el_before_av_textblock '><span class='hr-inner '><span class=\"hr-inner-style\"><\/span><\/span><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p><strong>Step 6) Start the session, run workload, stop session<\/strong><\/p>\n<p>Self-explanatory \ud83d\ude09<br \/>\n(you can use the GUI or T-SQL or Powershell)<\/p>\n<p><strong>Step 7) Analyze the data<\/strong><\/p>\n<p>Once you are done and want to analyze the captured data there are 2 ways: SSMS Extended Events Viewer, or T-SQL using sys.fn_xe_file_target_read_file.<\/p>\n<p>Using the fn_xe_file_target_read_file-Function you will notice, that different to the local file target the storage container URL only accepts exact file name matches \u2013 no wildcard. This makes working with the File-Target extra inefficient.<\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-af180a09473cc32c0962d754101a0ef6\">\n.avia-image-container.av-av_image-af180a09473cc32c0962d754101a0ef6 img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-af180a09473cc32c0962d754101a0ef6 .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-af180a09473cc32c0962d754101a0ef6 av-styling- avia-align-center  avia-builder-el-34  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5407 avia-img-lazy-loading-not-5407 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_fn_xe_file_target_read_file.jpg\" alt='' title='1804_Azure_SQL_DB_fn_xe_file_target_read_file'  height=\"162\" width=\"707\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_fn_xe_file_target_read_file.jpg 707w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_fn_xe_file_target_read_file-600x137.jpg 600w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_fn_xe_file_target_read_file-300x69.jpg 300w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_fn_xe_file_target_read_file-705x162.jpg 705w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_SQL_DB_fn_xe_file_target_read_file-450x103.jpg 450w\" sizes=\"(max-width: 707px) 100vw, 707px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>I also show how to parse the file target here: <a href=\"https:\/\/andreas-wolter.com\/en\/how-to-import-extended-events-session-event_file-target\/\">How to import Extended Events session event_file target and parse deadlock-graph<\/a><\/p>\n<p>Because of this limitation though, I recommend\u00a0downloading the files to a special monitoring server (in Azure) and taking it from there.<\/p>\n<p><strong>Download the file to a Monitoring Server<\/strong><\/p>\n<p>To download the file I recommend using <a href=\"https:\/\/azure.microsoft.com\/en-us\/features\/storage-explorer\/\" target=\"_blank\" rel=\"noopener\">Azure Storage Explorer<\/a><\/p>\n<\/div><\/section>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_image-303c710363b7f9e0365a4896ac11f59c\">\n.avia-image-container.av-av_image-303c710363b7f9e0365a4896ac11f59c img.avia_image{\nbox-shadow:none;\n}\n.avia-image-container.av-av_image-303c710363b7f9e0365a4896ac11f59c .av-image-caption-overlay-center{\ncolor:#ffffff;\n}\n<\/style>\n<div  class='avia-image-container av-av_image-303c710363b7f9e0365a4896ac11f59c av-styling- avia-align-center  avia-builder-el-36  el_after_av_textblock  el_before_av_textblock '   itemprop=\"image\" itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/ImageObject\" ><div class=\"avia-image-container-inner\"><div class=\"avia-image-overlay-wrap\"><img decoding=\"async\" class='wp-image-5409 avia-img-lazy-loading-not-5409 avia_image ' src=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Storage_Explorer_download_file.jpg\" alt='' title='1804_Azure_Storage_Explorer_download_file'  height=\"154\" width=\"757\"  itemprop=\"thumbnailUrl\" srcset=\"https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Storage_Explorer_download_file.jpg 757w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Storage_Explorer_download_file-600x122.jpg 600w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Storage_Explorer_download_file-300x61.jpg 300w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Storage_Explorer_download_file-705x143.jpg 705w, https:\/\/andreas-wolter.com\/wp-content\/uploads\/2018\/04\/1804_Azure_Storage_Explorer_download_file-450x92.jpg 450w\" sizes=\"(max-width: 757px) 100vw, 757px\" \/><\/div><\/div><\/div>\r\n\r\n<section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><p>Now you can analyze the file locally in SSMS.<br \/>\nThe first times this procedure will be very clumsy and slow until you develop a routine and automation for all of those steps. I hope this guide helps you get quick start with Extended Events in Azure SQL Database.<\/p>\n<p><br class=\"\u201cclear\u201c\" \/>Happy Tracing<\/p>\n<p>Andreas<\/p>\n<\/div><\/section>\r\n\r\n<div  class='hr av-av_hr-0ff602b3e980a3377077ff3c1c834df6 hr-default  avia-builder-el-38  el_after_av_textblock  el_before_av_one_full '><span class='hr-inner '><span class=\"hr-inner-style\"><\/span><\/span><\/div>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_one_full-97c650ae075063b375f558a776c570f8\">\n#top .flex_column.av-av_one_full-97c650ae075063b375f558a776c570f8{\nmargin-top:40px;\nmargin-bottom:40px;\n}\n.flex_column.av-av_one_full-97c650ae075063b375f558a776c570f8{\nborder-radius:0px 0px 0px 0px;\npadding:0px 0px 0px 0px;\n}\n.responsive #top #wrap_all .flex_column.av-av_one_full-97c650ae075063b375f558a776c570f8{\nmargin-top:40px;\nmargin-bottom:40px;\n}\n<\/style>\n<div  class='flex_column av-av_one_full-97c650ae075063b375f558a776c570f8 av_one_full  avia-builder-el-39  el_after_av_hr  el_before_av_social_share  first flex_column_div av-zero-column-padding  '     ><section  class='av_textblock_section av-av_textblock-2de302bf1aa3cf4c9157dbe6f50ac7eb '   itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/BlogPosting\" itemprop=\"blogPost\" ><div class='avia_textblock'  itemprop=\"text\" ><div><\/div>\n<div><\/div>\n<\/div><\/section><\/div>\r\n\r\n<div  class='av-social-sharing-box av-av_social_share-00566587b7355f5f3aec989679437938 av-social-sharing-box-default  avia-builder-el-41  el_after_av_one_full  el_before_av_hr  av-social-sharing-box-fullwidth'><div class=\"av-share-box\"><h5 class='av-share-link-description av-no-toc '>Eintrag teilen<\/h5><ul class=\"av-share-box-list noLightbox\"><li class='av-share-link av-social-link-facebook' ><a target=\"_blank\" aria-label=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https:\/\/andreas-wolter.com\/en\/1804-tracing-with-extended-events-in-azure-sql-database\/&#038;t=Tracing%20with%20XEvents%20in%20Azure%20SQL%20Database\" aria-hidden=\"false\" data-av_icon=\"\ue8f3\" data-av_iconfont=\"entypo-fontello\" title=\"\" data-avia-related-tooltip=\"Share on Facebook\" rel=\"noopener\"><span class='avia_hidden_link_text'>Share on Facebook<\/span><\/a><\/li><li class='av-share-link av-social-link-twitter' ><a target=\"_blank\" aria-label=\"Share on Twitter\" href=\"https:\/\/twitter.com\/share?text=Tracing%20with%20XEvents%20in%20Azure%20SQL%20Database&#038;url=https:\/\/andreas-wolter.com\/en\/?p=5370\" aria-hidden=\"false\" data-av_icon=\"\ue8f1\" data-av_iconfont=\"entypo-fontello\" title=\"\" data-avia-related-tooltip=\"Share on Twitter\" rel=\"noopener\"><span class='avia_hidden_link_text'>Share on Twitter<\/span><\/a><\/li><li class='av-share-link av-social-link-linkedin' ><a target=\"_blank\" aria-label=\"Share on LinkedIn\" href=\"https:\/\/linkedin.com\/shareArticle?mini=true&#038;title=Tracing%20with%20XEvents%20in%20Azure%20SQL%20Database&#038;url=https:\/\/andreas-wolter.com\/en\/1804-tracing-with-extended-events-in-azure-sql-database\/\" aria-hidden=\"false\" data-av_icon=\"\ue8fc\" data-av_iconfont=\"entypo-fontello\" title=\"\" data-avia-related-tooltip=\"Share on LinkedIn\" rel=\"noopener\"><span class='avia_hidden_link_text'>Share on LinkedIn<\/span><\/a><\/li><\/ul><\/div><\/div>\r\n\r\n\n<style type=\"text\/css\" data-created_by=\"avia_inline_auto\" id=\"style-css-av-av_hr-4474f20d2389e2e5ecf918a02da5132e\">\n#top .hr.hr-invisible.av-av_hr-4474f20d2389e2e5ecf918a02da5132e{\nheight:50px;\n}\n<\/style>\n<div  class='hr av-av_hr-4474f20d2389e2e5ecf918a02da5132e hr-invisible  avia-builder-el-42  el_after_av_social_share  el_before_av_comments_list '><span class='hr-inner '><span class=\"hr-inner-style\"><\/span><\/span><\/div>\r\n\r\n<div  class='av-buildercomment av-av_comments_list-88ce68e426f11248fa394058a3de040f  av-blog-meta-author-disabled av-blog-meta-html-info-disabled'><\/div>","protected":false},"excerpt":{"rendered":"Being Developer, Administrator or simply Support for an Azure SQL Database based Application, there are those moments when the Azure-provided Dashboard-capabilities are not sufficient and you need to conduct a throughout trace of certain statements occurring.","protected":false},"author":4,"featured_media":5421,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124,55,56],"tags":[18,19,182],"class_list":["post-5370","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","category-extended-events-en","category-tracing-monitoring-en","tag-extended-events-en","tag-performance-analysis-en","tag-tracing-en"],"_links":{"self":[{"href":"https:\/\/andreas-wolter.com\/en\/wp-json\/wp\/v2\/posts\/5370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andreas-wolter.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andreas-wolter.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andreas-wolter.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/andreas-wolter.com\/en\/wp-json\/wp\/v2\/comments?post=5370"}],"version-history":[{"count":13,"href":"https:\/\/andreas-wolter.com\/en\/wp-json\/wp\/v2\/posts\/5370\/revisions"}],"predecessor-version":[{"id":7022,"href":"https:\/\/andreas-wolter.com\/en\/wp-json\/wp\/v2\/posts\/5370\/revisions\/7022"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/andreas-wolter.com\/en\/wp-json\/wp\/v2\/media\/5421"}],"wp:attachment":[{"href":"https:\/\/andreas-wolter.com\/en\/wp-json\/wp\/v2\/media?parent=5370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andreas-wolter.com\/en\/wp-json\/wp\/v2\/categories?post=5370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andreas-wolter.com\/en\/wp-json\/wp\/v2\/tags?post=5370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}