Day 12

Quiz

1:What is the difference between a shared and an exclusive lock?
A1: A shared lock, acquired during a read process, prevents other users from changing data, but permits other processes to read the data. An exclusive lock, acquired during a write process, prevents other users from reading or writing data.
2:What statements (select, insert, update, delete) will acquire a shared lock?
A2: All select statements acquire shared locks. Insert, update, and delete statements that rely on other tables will use shared locks to read from those tables in addition to exclusive locks on the affected table.
3:What is an intent lock, and what exactly gets locked?
A3: An intent lock is a bookmark that a process uses to tell other processes that it ...

Get Sams Teach Yourself Transact-SQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.