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 of an antique sewing machine beside two spools whose threads form a tight vermilion knot

NOLOCK Without WITH: Table Hint or Table Alias?

October 24, 2017
Pinal Dave
SQL Performance
Compatibility Level, Query Hint, SQL Lock, SQL Scripts

NOLOCK without WITH and without parentheses is not a hint, because SQL Server reads it as a table alias. This post proves it with a lock test, shows why the compatibility level doesn’t change it, and gives a query that finds the bad syntax in your code. It ends with the safer ways to write the hint.

Read More
A glaze vessel and preserved sampling dishes sit beside a clean dish for a new sample.

SQL SERVER – 3 Different Usage of DBCC SQLPERF

August 19, 2017
Pinal Dave
SQL Performance
SQL Lock, SQL Scripts, SQL Server, SQL Server DBCC, SQL Wait Stats

DBCC SQLPERF can report log usage or reset cumulative wait and latch statistics. I separate reporting from resetting the baseline.

Read More
Two small cars nosing into the same single empty parking space on a cobbled street from opposite directions.

Upsert Patterns in SQL Server Without Race Conditions

August 11, 2016
Pinal Dave
SQL Tips and Tricks
Deadlock, SQL Lock, SQL Server, SQL Transactions

Compare upsert patterns under concurrent calls, protect missing-key ranges, test MERGE with HOLDLOCK, and keep unique keys as a guard.

Read More
A deckhand seen from behind swinging a mooring rope toward a bollard again after a throw fell short.

A Retry Loop in T-SQL for Deadlock Victims and Lock Timeouts

August 1, 2016
Pinal Dave
SQL Tips and Tricks
Deadlock, SQL Lock, SQL Server, SQL Transactions

Build a bounded retry loop for deadlock and lock-timeout errors, roll back each failed transaction, and keep diagnostics beside retries.

Read More
SQL SERVER - FIX – Property IsLocked is Not Available for Login

SQL SERVER – FIX – Property IsLocked is Not Available for Login

July 24, 2015
Pinal Dave
SQL Tips and Tricks
SQL Lock, SQL Scripts

Opening sa login properties in SSMS failed with Property IsLocked is not available for Login. I used Profiler to find the query returning NULL, and here is the fix.

Read More
A row of kitchen cupboard doors, one knob worn to bare brass and the paint around it rubbed pale.

Finding Hot Tables With sys.dm_db_index_usage_stats

October 7, 2014
Pinal Dave
SQL Performance
SQL DMV, SQL Index, SQL Lock, SQL Performance, SQL Server

Identify hot tables with index usage, lock and latch counters, table sizes, and retained snapshots that describe a real workload interval.

Read More
Blocked process report window.

SQL SERVER – Find Blocking Using Blocked Process Threshold  

June 30, 2014
Pinal Dave
SQL Tips and Tricks
SQL Activity Monitor, SQL Lock

My friend Jim came back with more blocking questions. Here is how the blocked process threshold option, a feature hidden in plain sight, helps find blocking.

Read More
Previous 1 2 3 4 5 6 7 8 … 11 Next
  • Books
  • Testimonials
  • Privacy Policy

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