Error 25602 storing file of XEvent on Azure Storage.
Applies to: Azure SQL Database.
Consider that you have created a extended event session for an Azure SQL
Database where you store the resulting file in Azure Blob Storage, but when you
start the extended event session you receive Error 25602:
Microsoft SQL Server Management Studio
An exception occurred while executing a Transact-SQL statement or batch.
The target, "xxxxx.package0.event_file", encountered a configuration error
during initialization. Object cannot be added to the event session. The
operating system returned error 13: 'The data is invalid.
'while creating the file
(Microsoft SQL Server, Error: 25602)
We created a shared access signature for container storage and also created a
database scoped credential on the SQL Azure database. The extended event is
using the credential created.
This error is related to the type of storage account created. The extended event
cannot write on a Blob Storage account.
Use instead a General Purpose type of storage account instead.
Please do not use a general purpose v1 storage account, use instead a general
purpose v2 account type (based on ARM).