Day 12. Understanding Database Locking

In yesterday's lesson, you learned how to write more complex programs and handle variables. Today, you will learn how SQL Server locks data to isolate work in your applications. The most fundamental job of a relational database is to maintain data integrity, especially when many users are working in and around the same data. Databases use locks to make certain that the work you do is always complete and consistent.

By the end of this lesson, you will

  • Understand how SQL Server uses locks

  • Be able to use different transaction isolation levels to manage lock persistence

  • Know how to read locking output to find blocking locks

  • Be able to control lock types through query hints

  • Understand and be able to avoid deadlocks ...

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.