{"title":"Analyzing database deadlock telemetry","url":"https://jonas-paprotka.de/docs/dev-itpro/administration/telemetry-database-deadlocks-trace/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-database-deadlocks-trace, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-database-deadlocks-trace","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Analyze database deadlock telemetry in Business Central to identify deadlock victims, inspect SQL statements and AL stack traces, and troubleshoot contention.","date":"2026-11-17","meta":{"topic":"concept-article"},"outline":[{"level":1,"title":"Analyzing database deadlock telemetry","slug":"analyzing-database-deadlock-telemetry","at":0,"chars":4055},{"level":2,"title":"Database deadlock occurred","slug":"database-deadlock-occurred","at":1487,"chars":2339},{"level":3,"title":"General dimensions","slug":"general-dimensions","at":1548,"chars":320},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions","at":1868,"chars":1958},{"level":2,"title":"Related information","slug":"related-information","at":3826,"chars":229}],"text":"# Analyzing database deadlock telemetry\nINTRODUCED IN: Business Central 2022 release wave 1, version 20.0\nThe database deadlock telemetry gathers information about deadlocks that happen. Deadlocks can prevent users from completing tasks in the Business Central client. A deadlock occurs when two or more processes block each other because each has locked a database resource. SQL Server terminates and rolls back one of the transactions, known as the deadlock victim. Business Central then emits a telemetry signal for the affected session.\nAs a partner or developer, this telemetry provides several benefits:\n Makes you aware that there are deadlocks happening.\n Lets you identify who was the victim in deadlock situations.\n In some deadlock problems, the process that is the victim and the process that succeeds will change by chance. In these cases, both will be stored in the telemetry resource as different deadlock events.\n For further monitoring and troubleshooting, this telemetry is complemented by other features like:\n   Enable SQL database deadlock monitoring on a sandbox or on-premises environment. See Monitoring SQL Database Deadlocks<monitor-database-deadlocks>.\n   Database lock trace telemetry. See telemetry-database-locks-trace.\n> IMPORTANT\n> The EnableDeadlockMonitoring server setting controls the separate SQL deadlock monitoring feature. It isn't required to collect the RT0028 telemetry event. See Monitoring SQL Database Deadlocks<monitor-database-deadlocks>.\n## Database deadlock occurred\nOccurs when a deadlock occurs.\n### General dimensions\nDimension|Description or value\nmessage|Database deadlock occurred\nseverityLevel|3\nuser_Id|The user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. See telemetry-enable-application-insights#assign-a-telemetry-id-to-users.\n### Custom dimensions\nDimension|Description or value\neventId|RT0028\naadTenantId|Specifies the Microsoft Entra tenant ID used for Microsoft Entra authentication. For on-premises, if you aren't using Microsoft Entra authentication, this value is common.\nalObjectId|Specifies the ID of the AL object that ran the transaction that was victim of the deadlock.\nalObjectName|Specifies the name of the AL object that ran the transaction that was victim of the deadlock.\nalObjectType|Specifies the type of the AL object that ran the transaction that was victim of the deadlock, such as a page or report.\nalStackTrace|The stack trace in AL.\nclientType|Specifies the type of client that executed the SQL statement, such as Background or WebClient. See ClientType option type<../developer/methods-auto/clienttype/clienttype-option>.\ncompanyName|Specifies the display name of the Business Central company.\ncomponent|Dynamics 365 Business Central Server\ncomponentVersion|Specifies the version number of the component that emits telemetry (see the component dimension.)\nenvironmentName|Specifies the name of the tenant environment. See Managing environments<tenant-admin-center-environments>.\nenvironmentType|Specifies the environment type for the tenant, such as Production, Sandbox, Trial. See tenant-admin-center-environments#types-of-environments.\nextensionId|Specifies the AppID of the extension that was involved in the deadlock.\nextensionName|Specifies the name of the extension that was involved in the deadlock.\nextensionVersion|Specifies the version of the extension that was involved in the deadlock.\nsessionId|Specifies the ID of the session that was involved in the deadlock.\nsqlServerSessionId|Specifies the ID of the SQL server session that was the victim of the deadlock.\nsqlStatement|Specifies the SQL statement that was executing in the deadlock victim's transaction.\ntelemetrySchemaVersion|Specifies the version of the Business Central telemetry schema.\n## Related information\nMonitoring and Analyzing Telemetry<telemetry-overview>\nDatabase Lock Timeout Telemetry<telemetry-database-locks-trace>\nEnable Sending Telemetry to Application Insights<telemetry-enable-application-insights>"}