get_lock_details
Retrieve current lock details from Azure SQL, including owning session, lock mode, resource type, and SQL text, to diagnose blocking and contention.
Instructions
Get current lock details from sys.dm_tran_locks with owning session, lock mode (S, X, IX, IS, U, Sch-M), resource type, and SQL text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum lock rows to return (waiting locks first, max 1000). | |
| database_name | No | Optional database name. Defaults to AZURE_SQL_DEFAULT_DATABASE. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||