Unable to start Azure SQL Exteded Events session that write on storage account container

Alessandro Colombi 0 Reputation points

Hello team,

I am following this guide https://techcommunity.microsoft.com/t5/azure-database-support-blog/extended-events-capture-step-by-step-walkthrough/ba-p/369013 in order to use Extende Events session on Azure SQL.

My scenario is really simple, I have an Azure SQL database server configured that allow public inbound connection from specific IP addresses and I have a storage account (storage V2 for general purpose) container with the option to enable public network access from all networks.

Both Azure SQL and storage account do not use vNet and private endopoint.

Based on the guide I have created master encryption key on database, scope credential to on Azure db in order to get access to the storage account and configured an Extende Events session that use the shared access signature created for the container.

Trying to activate XE session I get the following error

The target, "5B2DA06D-898A-43C8-9309-39BBBE93EBBD.package0.event_file", encountered a configuration error during initialization. Object cannot be added to the event session. (null) (Microsoft SQL Server, Error: 25602)

I understood this error is related in some way to the storage account credential or resource permission but I am not able to get more details. Do you have any suggestions?

Thank you


Azure SQL Database
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,820 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Morillo 33,176 Reputation points MVP

    Make sure you are using General Purpose V2 account instead of V1. Please see the images here.

    Take also in consideration that the storage account URL and container name as case sensitive.

  2. Rahul Randive 8,921 Reputation points Microsoft Employee

    Thanks for your question.

    The target, 'XXX.package0.event_file', encountered a configuration error during initialization. Object cannot be added to the event session.  (Microsoft SQL Server, Error: 25602).

    Here is the findings of such error. 

    In my case, I found that the storage account that the extended event is trying to write is not random-accessible pages (classic or general purpose) and page blobs (general-purpose v2 type), for this reason, I got this error. Changing the correct one, I was able to start my extended event.

     Extended Events: Azure Storage Account Types Matter - Microsoft Community Hub 

    Thank you!