What is a lock?

A lock is the mechanism that controls access to data pages and tablespaces.

Showing Answers 1 - 6 of 6 Answers

Sukanya Srinivas

  • Apr 20th, 2007
 

Lock is one of the component of DB2. IRLM(IMS-DBe Resource lock Manager) used for data locking and unlocking. Lock is of two types.

1) Share lock
2) Exclusive Lock      

A) Share lock is applicalble whenever any program reads data from DB2 table.           


B) Exclusive lock is applicable whenever any program updates  (INSERT,DELETE,UPDATE) any DB2 table.

  Was this answer useful?  Yes

Raghunathan Asari

  • Jul 23rd, 2007
 

Lock is a DB2 mechanism by which DB2 can provide Concurrency and Consistency at 
the same time(not exactly).  Based on the SQL statement DB2 provides different  types
of locks. They are
   1. SHARED LOCK (S)
   2. UPDATE LOCK (U)
   3. EXCLUSIVE LOCK (X)
Apart from the above mentioned locks, DB2 uses another type of lock called "intent" lock. This intent lock can be converted into IS( Intent Share), IX( Intent Exclusive ) and
SIX (Share with Intent Exclusive) locks.

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