‎2008 Aug 21 10:25 AM
hi experts,
i have a confusion in lock modes , can any one correct my answers.
1.wirte(exclusive) lock.
2. read ( shared) lock.
3. exclusive but cummilative.
1. write lock :- it allows only one user to change the record or object. it doesnot allow other users even in disply mode also. eveen it doesnot allow other locks on the record.
2. read lock :- several users can access locked data at the same time in display mode. request from further shared locks are accepted. even if they are from diff users.
3.exclusive but cummilative:- i donot know exact defination.
pls give solution to my question.
‎2008 Aug 21 10:28 AM
You are almost at right track.
moreover you can refer:
http://help.sap.com/saphelp_nw04/helpdata/en/7b/f9813712f7434be10000009b38f8cf/frameset.htm
‎2008 Aug 21 11:01 AM
Type of Lock
Shared lock
S (Shared)
Several users (transactions) can access locked data at the same time in display mode. Requests from further shared locks are accepted, even if they are from different users. An exclusive lock set on an object that already has a shared lock will be rejected.
Exclusive lock
E (Exclusive)
An exclusive lock protects the locked object against all types of locks from other transactions. Only the same lock owner can reset the lock (accumulate).
Exclusive but not cumulative lock
X (eXclusive non-cumulative)
Whereas exclusive locks can be requested several times by the same transaction and released one by one, an exclusive, non-cumulative lock can only be requested once by the same transaction. Each further lock request will be rejected.
Optimistic lock
O (Optimistic)
Optimistic locks initially behave like shared locks and can be converted into exclusive locks. See Optimistic Locks.
‎2008 Aug 21 7:11 PM
Hi Kartik,
You are right, the best of learning is by comparision.
Exclusive Lock(E):
the locked data can only be displayed or modified by single user ie. the owner of the object. access to other users is denied.
Exclusive but not Cumulative(X):
it is similiar to exclusive lock. it allows only a single user access. (E) can be called several times from the same transaction. in contrast, a lock type X can be called only once during the transaction. any other call for this lock is rejected.
Pls have a look at this thread
http://help.sap.com/saphelp_nw2004s/helpdata/en/7b/f9813712f7434be10000009b38f8cf/content.htm
Regards,
Vvieks