Quiz on NOLOCK hints in SQL Server

Q1. Which table hint is equivalent to NOLOCK?

  • NOHOLDLOCK
  • LESSLOCK
  • READCOMMITTED
  • READUNCOMMITTED
  • YOLO
READUNCOMMITTED

Q2. Fill in the blank.

This statement applies NOLOCK to every table referenced in your session (unless otherwise hinted in the queries).

SET  _________ ISOLATION LEVEL READ UNCOMMITTED

TRANSACTION

Q3. Fill in the blank with a term that describes a phenomenon that only occurs under the read uncommitted isolation level.

Reading uncommitted data is called a  _______ read.

dirty

Q4. Other “bad data” phenomena that can occur under READ UNCOMMITTED are….

Choose all that apply….

  • Un-split reads
  • Non-repeatable reads
  • Phantom reads
  • Backward reads
  • Hopeful reads
non-repeatable reads, phantom reads

Q5. Fill in the blank

Creating an _______  can often reduce or eliminate blocking.

index

Q6. Which lock type does a query using NOLOCK still require against a table?

  •  LCK_M_RIn_X
  •  LCK_M_U
  •  LCK_M_SCH_S
  •  LCK_M_SCH_M
LCK_M_SCH_S

Q7. Which type of pages are used by an allocation order scan?

  •  XTP Pages
  •  PFE Pages
  •  B+ Tree Pages
  •  IAM Pages
IAM

Q8. If you want to get an allocation order scan, you have to be willing to read uncommitted data.

  •  True
  •  False
False

Q9 The NOLOCK hint in queries is ignored if you enable Read Committed Snapshot Isolation (RCSI) for a database.

  •  True
  •  False
False
Back to: The Dirty Secrets of NOLOCK (50 minutes) > Quiz

Share a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Menu