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 a seedling in a clay pot beside a glass bell jar covering a lit candle

DDL in a Transaction: What Rolls Back and What Blocks

November 3, 2020
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Transactions, Transaction Isolation

DDL in a transaction works in SQL Server: CREATE, ALTER and DROP roll back like any other change. This post proves it with a small demo, lists the statements that are refused inside a transaction, and shows which locks an open DDL transaction holds and who has to wait for them.

Read More
WITH NOLOCK

Dirty Read with NOLOCK – SQL in Sixty Seconds #110

August 26, 2020
Pinal Dave
SQL Video
SQL in Sixty Seconds, SQL Performance, SQL Scripts, SQL Server, Transaction Isolation

Recently I noticed that my client has been using the WITH NOLOCK hint with their queries and expecting that it will improve the queries performance.

Read More
Gouache painting of an open wooden music box on a piano stool with a jammed vermilion cylinder inside

Error 41368: Memory-Optimized Tables and Transactions

June 11, 2019
Pinal Dave
SQL Tips and Tricks
In-Memory OLTP, SQL Error Messages, SQL Scripts, SQL Transactions, Transaction Isolation

Error 41368 appears when an explicit transaction reads a memory-optimized table at the read committed level. This post reproduces the error, fixes it with a table hint or a database option, and shows the two related errors that the fixes do not cure. It also answers what the option changes for other tables.

Read More
Gouache painting of three seedling pots on a greenhouse bench, one quietly covered by a glass cloche with a vermilion rim

MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT: How to Check It Is On

June 6, 2019
Pinal Dave
SQL Tips and Tricks
In-Memory OLTP, Snapshot, SQL Memory, SQL Scripts, Transaction Isolation

MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT is a database option, so DBCC USEROPTIONS never shows it. This post reads the option from sys.databases and from DATABASEPROPERTYEX, turns it on in a demo database and finds every database that has it. It also shows a guarded script you can reuse in deployments.

Read More
An unsettled mosaic in its assembly jig is inspected beside a stable finished sample.

SQL SERVER – Applying NOLOCK to Every Single Table in Select Statement – SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

September 3, 2018
Pinal Dave
SQL Performance
Query Hint, SQL Scripts, SQL Server, Transaction Isolation

READ UNCOMMITTED changes session read isolation without adding NOLOCK to every table. A workshop procedure made the distinction useful.

Read More
SQL Server query plan.

SQL SERVER – How to Know Transaction Isolation Level for Each Session?

June 7, 2018
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Performance, SQL Scripts, SQL Server, Transaction Isolation

An outsourced app had teams using different coding standards, and performance suffered. Here is how to find the transaction isolation level of each session.

Read More
SQL SERVER - Difference Between Read Committed Snapshot and Snapshot Isolation Level

SQL SERVER – Difference Between Read Committed Snapshot and Snapshot Isolation Level

July 3, 2015
Pinal Dave
SQL Tips and Tricks
Transaction Isolation

Read Committed Snapshot and Snapshot Isolation level sound alike but work differently. I explain the difference and show the ALTER DATABASE command for each.

Read More
1 2 3 Next
  • Books
  • Testimonials
  • Privacy Policy

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