1.

What Are The Lock Types?

Answer»

SQL server supports following locks:

  1. Shared LOCK
  2. UPDATE lock
  3. Exclusive lock

Shared lock

  • Shared Lock allows simultaneous access of record by multiple Select statements.
  • Shared Lock blocks record from updating and will remain in queue waiting while record is accessed for reading.
  • If update process is going on then read command will have to wait until updating process FINISHES.

Update locks

This lock is used with the resources to be UPDATED.

Exclusive locks

This kind of lock is used with data MODIFICATION operations like update, insert or delete.

SQL server supports following locks:

Shared lock

Update locks

This lock is used with the resources to be updated.

Exclusive locks

This kind of lock is used with data modification operations like update, insert or delete.



Discussion

No Comment Found