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

Alessandro Colombi 0 Reputation points
2023-05-04T13:55:10.71+00:00

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

Alessandro

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,944 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Morillo 33,426 Reputation points MVP
    2023-05-04T15:22:37.74+00:00

    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 9,176 Reputation points Microsoft Employee
    2023-05-04T20:03:23.96+00:00

    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!