This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Gouache painting: a wooden loom holding a half-woven linen runner in cream and sage, the last stretch unpicked into loose threads on the floor, with one vermilion knot marking where the finished cloth ends

SAVE TRANSACTION: Roll Back Half a Transaction

September 15, 2021
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Lock, SQL Stored Procedure, SQL Transactions

SAVE TRANSACTION sets a marker inside an open transaction. You can roll back to it and keep the earlier work. This post tests it on SQL Server 2025. It shows why a nested BEGIN TRAN can’t do the same and what XACT_STATE() returns after an error.

Read More
An inspection bridge observes a workpiece while separate holding mechanisms remain visible.

SQL SERVER – NOLOCK with DMVs

September 14, 2021
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Lock, SQL Scripts, SQL Server

NOLOCK with DMVs is not a blanket reassurance against monitoring waits. A customer asked about omitting the hint.

Read More
A heavy sled hauled almost to the top of a snowy slope, its red rope trailing back down

Before You KILL a Session: Estimating the Rollback Cost

February 4, 2021
Pinal Dave
SQL Tips and Tricks
DBA, SQL Lock, SQL Server, SQL Transactions

Before you KILL a session, inspect its transaction age, log bytes, current command, and likely rollback work, then monitor the undo safely.

Read More
Birds spaced along a power line except around one red insulator where dozens crowd together

Finding the Indexes Behind Lock Waits With Operational Stats

January 18, 2021
Pinal Dave
SQL Performance
SQL DMV, SQL Index, SQL Lock, SQL Wait Stats

Rank indexes behind lock waits with operational stats, separate latches from locks, and test targeted access or row versioning fixes.

Read More
Gouache painting of two goats meeting on a narrow bridge with a small vermilion passing platform added to its side

Deadlock Victim Selection: Protect One Transaction

June 24, 2020
Pinal Dave
SQL Performance
Deadlock, SQL Lock, SQL Server Configuration, SQL Stored Procedure

Deadlock victim selection decides which of two blocked transactions SQL Server rolls back. This post shows the rules, sets DEADLOCK_PRIORITY on one procedure, reproduces a deadlock with two query windows, and shows what the setting cannot do. It ends with the two fixes that remove the deadlock itself.

Read More
Illustrated cover: The Blocking Tree

SQL SERVER – Blocking Tree – Identifying Blocking Chain Using SQL Scripts

April 20, 2020
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Lock, SQL Scripts, SQL Server

Whenever I end up on a situation where we have lots of blocking issues with my client, I depend on the script of the Blocking Tree.

Read More
Two hands across a table, one holding salt and one holding a red pepper shaker, each reaching for the other's.

Reading Deadlock Graphs From the system_health Session

March 24, 2020
Pinal Dave
SQL Performance
DBA, Deadlock, SQL Extended Events, SQL Lock

Read deadlock graphs from system_health, identify victims and resource owners, reproduce a two-session cycle, and choose a targeted fix.

Read More
Previous 1 2 3 4 5 … 10 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com