What is the lock types supported in SQL Server ?

October 28, 2007 · Filed Under MS SQL Server Interview Questions, Placement Questions 



Don't want to miss a single bit? Subscribe By Email for Daily Jobs

Enter your email address :

All the latest from JobsAdda on Jobsadda.com delivered to your mailbox everyday.

There could be thousands of concurrent users trying to read or modify the database, sometimes exactly the same data. If not for locking, your database would quickly lose its integrity.

The following basic types of locks are available with SQL Server:

- Shared locks: Enable users to read data but not to make modifications.

- Update locks: Prevent deadlocking (discussed later in this session).

- Exclusive locks: Allow no sharing; the resource under an exclusive lock is unavailable to any other transaction or process.

- Schema locks: Used when table-data definition is about to change—for example, when a column is added to or removed from the table.

- Bulk update locks: A special type of lock used during bulk-copy operations.

Related Articles


Get Latest JobsAdda.com Jobs, news & updates  via Email