Azure 中的扩展事件 - Object 无法添加到事件 session

Extended events in Azure - Object cannot be added to the event session

我正在尝试在 Azure SQL 数据库上创建扩展事件。我已按照以下 Azure 文档的说明进行操作:

http://andreas-wolter.com/en/1804-tracing-with-extended-events-in-azure-sql-database/

https://blogs.msdn.microsoft.com/azuresqldbsupport/2018/03/13/extended-events-capture-step-by-step-walkthgrough/

我已成功创建扩展事件session。当我尝试启动 session 时,出现以下错误消息。

> 标题:Microsoft SQL Server Management Studio

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)


ADDITIONAL INFORMATION:

The target, "5B2DA06D-898A-43C8-9309-39BBBE93EBBD.package0.event_file", encountered a configuration error during initialization. Object cannot be added to the event session. The operating system returned error 5: 'Access is denied. ' while creating the file 'https://xxxxxxxxxxxxxxxx.blob.core.windows.net/Container/FileName_0_132028925297100000.xel'. (Microsoft SQL Server, Error: 25602)

请注意,我已经使用 Azure 门户创建了容器,我可以从门户上传文件。

请建议我解决错误。

尝试将扩展事件的目标更改为环形缓冲区:

    ADD TARGET package0.ring_buffer -- Store events in the ring buffer target
    (SET MAX_MEMORY = 4096, max_events_limit = 5000)
WITH (MAX_DISPATCH_LATENCY = 120 SECONDS,
      STARTUP_STATE = ON);

Here你会发现如何读取环形缓冲区。

根据我过去的经验,我也遇到了同样的问题。这是因为 Storage URL 或容器名称区分大小写。请使用您的 URL 再次验证。可能会解决您的问题。