Types of Lock

Explain share and exclusive type of lock.

Questions by beethakker

Showing Answers 1 - 6 of 6 Answers

rahulmca

  • Jan 24th, 2010
 

The two basic types of locks are DML (table) locks, and DDL (dictionary) locks. DML locks are designed to guarantee data integrity in a multi-user environment. DML locks prevent conflicting DML and DDL operations from interfering with each other’s operations. These locks are generally either table level locks, or row level locks. Following are different lock types:

Table Level Lock
Row Level Lock
DML Locks in Transactions
Enqueue Mechanism
DML Locks in Blocks
Automatic Table Lock Modes
Manual Table Lock Modes
Table Partition Locks

  Was this answer useful?  Yes

hmounir

  • Jan 25th, 2010
 

Oracle uses two modes of locking in a multi-user database:

  • Exclusive lock mode (X) prevents the associates resource from being shared. This lock mode is obtained to modify data. The first transaction to lock a resource exclusively is the only transaction that can alter the resource until the exclusive lock is released.
     
  • Share lock mode (S) allows the associated resource to be shared, depending on the operations involved. Multiple users reading data can share the data, holding share locks to prevent concurrent access by a writer (who needs an exclusive lock). Several transactions can acquire share locks on the same resource.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions