What is a Lock and let me know Different types of locks?

Answer Posted / udhaya

Shared (S) Used for operations that do not change or update
data (read-only operations), such as a SELECT statement.
Update (U) Used on resources that can be updated. Prevents
a common form of deadlock that occurs when multiple
sessions are reading, locking, and potentially updating
resources later.
Exclusive (X) Used for data-modification operations, such
as INSERT, UPDATE, or DELETE. Ensures that multiple updates
cannot be made to the same resource at the same time.
Intent Used to establish a lock hierarchy. The types of
intent locks are: intent shared (IS), intent exclusive
(IX), and shared with intent exclusive (SIX).
Schema Used when an operation dependent on the schema of a
table is executing. The types of schema locks are: schema
modification (Sch-M) and schema stability (Sch-S).
Bulk Update (BU) Used when bulk-copying data into a table
and the TABLOCK hint is specified

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are views required in the sql server or in any other database?

712


What is store procedure? How do they work?

760


How to rebuild all indexes on a single table?

770


How to list all triggers in the database with sys.triggers in ms sql server?

749


How to add the custom code in Report?

112






How can we rewrite sub-queries into simple select statements or with joins?

709


What is difference between count (*) and count column?

664


What is service broker? : sql server database administration

740


What is built-in/administrator?

728


what is normalization? Explain different levels of normalization? : Sql server database administration

893


Explain a checkpoint?

763


Which rendering formats are affected by the pagesize properties?

122


How many types of objects are there?

685


What is the difference between clustered and a non-clustered index?

771


Find first and last day of current month in sql server

764