且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Azure Log Analytics中的SQL死锁通知

更新时间:2023-02-07 19:53:27

你好,Alexey,

Hello Alexey,

您是否正在运行Azure SQL数据库?如果是这样,您是否已确认要按照以下说明将诊断日志发送到Log Analytics:

Are you running Azure SQL Databases?  If so, have you confirmed you are sending your diagnostic logs to Log Analytics as outlined here:

https://docs.microsoft.com/zh-cn/azure/sql-database/sql-database-metrics-diag-logging#azure-portal

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-metrics-diag-logging#azure-portal

我看到有一个死锁数据集已发送到Log Analytics:

I see there is a deadlocks dataset which is sent to Log Analytics:

https://docs.microsoft.com/zh-cn/azure/sql-database/sql-database-metrics-diag-logging#deadlocks-dataset

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-metrics-diag-logging#deadlocks-dataset

如果您想查看此类别中的所有内容,则可以使用类似以下的查询:

If you wanted to see everything in this Category, you could use a query like:

AzureDiagnostics |
where Category == "Deadlocks"

如果您要从该查询中获取结果,那么如何优化它可能会变得有意义.

If you are getting back results from this query, it will probably start to make sense how to refine it.

如果要在VM上运行服务,则必须进一步说明如何收集日志.

If you are running your services on VMs, you will have to further explain how you are gathering your logs.