There are different types of lock in SQL Server 2000 and 2005. These locks are applied in different situations. Following are the list of locks :
SQL Server uses shared locks for all read operations. For example a select statement.
This lock applied on those resources that can be updated. This lock prevents the common form of dead lock that occurs when multiple sessions are locking the data so that they can update it later.
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.
Used to establish a lock hierarchy. The different types of intent locks are: intent shared, intent exclusive, and shared with intent exclusive.
Used when an operation dependent on the schema of a table is executing. The different types of schema locks are: schema modification and schema stability.
BULK UPDATE -
This lock is applied when there is a bulk copying of data and the TABLOCK is applied.
KEY RANGE -
Protects the range of rows read by a query when using the serializable transaction isolation level. Ensures that other transactions cannot insert rows that would qualify for the queries of the serializable transaction if the queries were run again.Rajendra.prasad, if this helps please login to Mark As Answer. | Alert Moderator