LOCK MANAGEMENT CONCEPT IN SAP SYSTEMS
To Ensure the data consistency within a SAP system ,we need to ensure that the data is not editable by more than one user.
To do that SAP system used enqueue work process.The enqueue work process manages a logical lock of the sap transaction in the lock table.Now this lock table is located in the main memory of the instance with enqueue work process.
The instance whose main memory contains the lock table is called ENQUEUE SERVER.
Locks are different types :
- Write locks (Exclusive Lock) : This kind of lock can be edited by one user.The requests for another edit lock and read lock should be rejected.A Write lock protects the lock objects against all types of transactions.Only the same lock owner can set the lock again.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).
- Read Locks (Lock Mode Shared) : This kind of lock having read access while a table is lock by any user.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 (E) set by another user on an object that already has a shared lock will be rejected. Every extended exclusive lock (X) will also be rejected.
- Enhanced write locks X (eXclusive non-cumulative) : while a write lock is successively requested and released by the same transaction an enhanced write lock can be requested once,even by the same transaction.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 : An Optimistic lock is behaving like that 1st it request access to read data and then after it can be changed to write locks.An optimistic lock is set if the user display data in change mode. Optimistic locks initially behave like shared locks and can be converted into exclusive locks.
When the user1 will release the editable mode then only user2 can access the table or if it exceeded the idle time limit then also the enqueue lock automatically release and user2 can access the table.
From TCODE SM12 we can delete the lock,by deleting the user session .
But before deleting it from sm12 we need to send a mail to that particular user. We can get the user details from SU01,also checks SM04 that whether the user is still logged on or not before deleting anything.
No comments:
Post a Comment