1

I'm trying to setup Extended Events session on an Azure SQL DB. I've followed the instructions of the following Azure document: Event File target code for extended events in SQL Database

I'm getting the following error message:

Msg 25602, Level 16, State 1, Line 90 The target, "XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX.package0.event_file", encountered a configuration error during initialization. Object cannot be added to the event session. (null)

The session is created but cannot be activated. I'm not sure if it's a permissions error, or if I'm misunderstanding which fields are which.

It should be noted that I am able to create containers and load files to those containers in the target blob storage using my own user credentials, and running the PowerShell script actually creates the container and SAS policy with no issues.

The problem only occurs when I try to start my session.

Any suggestions?

jarlh
  • 42,561
  • 8
  • 45
  • 63
Eyal Zinder
  • 614
  • 1
  • 8
  • 21

2 Answers2

0

Change the type of the storage account to General Purpose and it will work. I faced that error myself and created an article here with the solution.

Alberto Morillo
  • 13,893
  • 2
  • 24
  • 30
  • That doesn't seem to be working for me. I've tried creating storage accounts as simple blobs, simple storage v1/v2 - in different locations, targeting different container types (blobs / tables). Same error every time. – Eyal Zinder Feb 19 '19 at 19:47
  • I am not facing the error after making the adjustments on the type of storage account. I don't know what else could it be. – Alberto Morillo Feb 19 '19 at 21:27
0

There are two scopes when creating extended events, database and server, the way the credentials are created will impact this. In addition to the extended events session scope from my understanding. Please try to create it in the different scope and confirm that the extended event sessions do not require a specific scope.

CREATE **CREDENTIAL** [https://vick.blob.core.windows.net/sql]
WITH IDENTITY='SHARED ACCESS SIGNATURE',
SECRET = 'sp=racwdl&st=2020-01-27T15:54:38dfdfererefdrefdredreffdrerfvfdrevsdf'

CREATE **DATABASE SCOPED CREDENTIAL** [https://vick.blob.core.windows.net/sql]
WITH IDENTITY='SHARED ACCESS SIGNATURE',
SECRET = 'sp=racwdl&st=2020-01-27T15:54:38dfdfererefdrefdredreffdrerfvfdrevsdf'
 
CREATE EVENT SESSION [Testpoc] ON **SERVER**
ADD EVENT sqlserver.blocked_process_report
ADD TARGET package0.event_file(SET filename=N'https://vick.blob.core.windows.net/sql')
WITH (STARTUP_STATE=ON)

CREATE EVENT SESSION [Testpoc] ON **DATABASE**
ADD EVENT sqlserver.blocked_process_report
ADD TARGET package0.event_file(SET filename=N'https://vick.blob.core.windows.net/sql')
WITH (STARTUP_STATE=ON)
bigvic94
  • 1
  • 1