You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: azure-sql/database/analyze-prevent-deadlocks.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -773,7 +773,7 @@ There are multiple techniques available to prevent deadlocks from reoccurring, i
773
773
- Breaking apart transactions into smaller transactions when possible.
774
774
- Using query hints, if necessary, to optimize performance. You can apply hints without changing application code [using Query Store](/sql/relational-databases/performance/query-store-hints?view=azuresqldb-current&preserve-view=true).
775
775
776
-
Find more ways to [minimize deadlocks in the Deadlocks guide](/sql/relational-databases/sql-server-deadlocks-guide#deadlock_minimizing).
776
+
Find more ways to [minimize deadlocks in the Deadlocks guide](/sql/relational-databases/sql-server-deadlocks-guide#minimize_deadlocks).
777
777
778
778
> [!NOTE]
779
779
>In some cases, you may wish to [adjust the deadlock priority](/sql/t-sql/statements/set-deadlock-priority-transact-sql) of one or more sessions involved in a deadlock if it is important for one of the sessions to complete successfully without retrying, or when one of the queries involved in the deadlock is not critical and should be always chosen as the victim. While this does not prevent the deadlock from reoccurring, it may reduce the impact of future deadlocks.
Copy file name to clipboardExpand all lines: docs/relational-databases/sql-server-deadlocks-guide.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -364,22 +364,22 @@ Implementing an error handler that traps error message 1205 allows an applicatio
364
364
365
365
The application should pause briefly before resubmitting its query. This gives the other transaction involved in the deadlock a chance to complete and release its locks that formed part of the deadlock cycle. This minimizes the likelihood of the deadlock reoccurring when the resubmitted query requests its locks.
Although deadlocks cannot be completely avoided, following certain coding conventions can minimize the chance of generating a deadlock. Minimizing deadlocks can increase transaction throughput and reduce system overhead because fewer transactions are:
370
370
371
-
-Rolled back, undoing all the work performed by the transaction.
372
-
-Resubmitted by applications because they were rolled back when deadlocked.
371
+
- Rolled back, undoing all the work performed by the transaction.
372
+
- Resubmitted by applications because they were rolled back when deadlocked.
373
373
374
374
To help minimize deadlocks:
375
375
376
-
-Access objects in the same order.
377
-
-Avoid user interaction in transactions. - Keep transactions short and in one batch.
378
-
-Use a lower isolation level.
379
-
-Use a row versioning-based isolation level.
380
-
- Set `READ_COMMITTED_SNAPSHOT` database option on to enable read-committed transactions to use row versioning.
381
-
- Use snapshot isolation.
382
-
-Use bound connections.
376
+
- Access objects in the same order.
377
+
- Avoid user interaction in transactions. - Keep transactions short and in one batch.
378
+
- Use a lower isolation level.
379
+
- Use a row versioning-based isolation level.
380
+
- Set `READ_COMMITTED_SNAPSHOT` database option on to enable read-committed transactions to use row versioning.
Copy file name to clipboardExpand all lines: docs/relational-databases/sql-server-transaction-locking-and-row-versioning-guide.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1640,7 +1640,7 @@ The only lock taken that references `HumanResources.Employee` is a schema stabil
1640
1640
1641
1641
In [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)], the `LOCK_ESCALATION` option of `ALTER TABLE` can disfavor table locks, and enable HoBT locks on partitioned tables. This option is not a locking hint, but can be used to reduce lock escalation. For more information, see [ALTER TABLE (Transact-SQL)](../t-sql/statements/alter-table-transact-sql.md).
1642
1642
1643
-
### <a id="Customize"></a> Customize locking for an index
1643
+
### Customize locking for an index
1644
1644
1645
1645
When optimized locking is enabled, [!INCLUDE[ssDEnoversion](../includes/ssdenoversion-md.md)] does not keep low-level locks for the duration of a transaction. There is no need to customize locking strategies for an index or to disable low-level locks.
1646
1646
@@ -1826,7 +1826,7 @@ You may have to use the KILL statement. Use this statement very carefully, howev
1826
1826
Deadlocks are a complex topic related to locking, but different from blocking.
1827
1827
1828
1828
- For more information on deadlocks, including monitoring, diagnosis, and samples, see the [Deadlocks guide for the SQL Server database engine](sql-server-deadlocks-guide.md).
1829
-
- For more information on deadlocks specific to Azure SQL Database, see [Analyze and prevent deadlocks in Azure SQL Database](../../azure-sql/database/analyze-prevent-deadlocks.md).
1829
+
- For more information on deadlocks specific to Azure SQL Database, see [Analyze and prevent deadlocks in Azure SQL Database](/azure/azure-sql/database/analyze-prevent-deadlocks).
1830
1830
1831
1831
## <aid="Additional_Reading"></a> See also
1832
1832
@@ -1839,4 +1839,4 @@ Deadlocks are a complex topic related to locking, but different from blocking.
1839
1839
## Next steps
1840
1840
1841
1841
-[Understand and resolve SQL Server blocking problems](/troubleshoot/sql/database-engine/performance/understand-resolve-blocking)
1842
-
-[Understand and resolve Azure SQL Database blocking problems](../../azure-sql/database/understand-resolve-blocking.md)
1842
+
-[Understand and resolve Azure SQL Database blocking problems](/azure/azure-sql/database/understand-resolve-blocking)
0 commit comments