# Analyzing database deadlock telemetry
INTRODUCED IN: Business Central 2022 release wave 1, version 20.0
The 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.
As a partner or developer, this telemetry provides several benefits:
 Makes you aware that there are deadlocks happening.
 Lets you identify who was the victim in deadlock situations.
 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.
 For further monitoring and troubleshooting, this telemetry is complemented by other features like:
   Enable SQL database deadlock monitoring on a sandbox or on-premises environment. See Monitoring SQL Database Deadlocks<monitor-database-deadlocks>.
   Database lock trace telemetry. See telemetry-database-locks-trace.
> IMPORTANT
> 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>.
## Database deadlock occurred
Occurs when a deadlock occurs.
### General dimensions
Dimension|Description or value
message|Database deadlock occurred
severityLevel|3
user_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.
### Custom dimensions
Dimension|Description or value
eventId|RT0028
aadTenantId|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.
alObjectId|Specifies the ID of the AL object that ran the transaction that was victim of the deadlock.
alObjectName|Specifies the name of the AL object that ran the transaction that was victim of the deadlock.
alObjectType|Specifies the type of the AL object that ran the transaction that was victim of the deadlock, such as a page or report.
alStackTrace|The stack trace in AL.
clientType|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>.
companyName|Specifies the display name of the Business Central company.
component|Dynamics 365 Business Central Server
componentVersion|Specifies the version number of the component that emits telemetry (see the component dimension.)
environmentName|Specifies the name of the tenant environment. See Managing environments<tenant-admin-center-environments>.
environmentType|Specifies the environment type for the tenant, such as Production, Sandbox, Trial. See tenant-admin-center-environments#types-of-environments.
extensionId|Specifies the AppID of the extension that was involved in the deadlock.
extensionName|Specifies the name of the extension that was involved in the deadlock.
extensionVersion|Specifies the version of the extension that was involved in the deadlock.
sessionId|Specifies the ID of the session that was involved in the deadlock.
sqlServerSessionId|Specifies the ID of the SQL server session that was the victim of the deadlock.
sqlStatement|Specifies the SQL statement that was executing in the deadlock victim's transaction.
telemetrySchemaVersion|Specifies the version of the Business Central telemetry schema.
## Related information
Monitoring and Analyzing Telemetry<telemetry-overview>
Database Lock Timeout Telemetry<telemetry-database-locks-trace>
Enable Sending Telemetry to Application Insights<telemetry-enable-application-insights>

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. https://jonas-paprotka.de/docs/dev-itpro/administration/telemetry-database-deadlocks-trace/
