What is Locking?
Locking is a mechanism implemented either on an entire table or a row. Locking avoids the destruction done by the transactions accessing the same resource. The resource may be data in a table or rows in a data dictionary. In order to obtain the locks on resources, Oracle maintains the first in, first out (FIFO) serialized locking technique. Oracle uses a data structure known as ENQUEUE. For example, if there are various transactions trying to access the same resource simultaneously, then the very first transaction will acquire the lock. The rest of the transactions will be put in ENQUEUE waiting for the first transaction to complete.
We’re all familiar with locking. If you lock your front door then it prevents burglars from walking off with your TV and video recorder. If you lock your cellar door then it stops your teenage children drinking your much-valued 1961 Chateaux Petrus! The same applies to records in a data store – if you lock the records then it prevents other people from changing them. The locking type is closely related to whether or not the recordset is updateable. If you’re using your recordset to query a data store, then the recordset is a copy of the records that you requested in the data store. That means that there’s one copy of the record in your recordset and another copy of the record in the data store. Then, updating a record is a two-stage process: • First, you edit the copy of the record that’s contained in your recordset • Second, you update your changes to the copy of the record that’s in the data store Here’s where the locking comes in: you can choose to lock the data store copy of the re
Locking was initially called Campbellocking after its inventor, Don Campbell. Campbell was a dancer who appeared on numerous shows in the late 1960s and early 1970s, but performers like James Brown, who also used similar techniques in performing his music, may have inspired him. Locking is often associated with break dancing today, but it occurred much earlier than many of today’s forms of hip hop. It’s still used regularly and unlike some versions of hip hop, may be more often performed to funk or pop music than to rap. The basic locking form is to hold a movement, usually well coordinated with music, after some fast dancing movements. The dancer remains, for a few seconds, locked in place, before resuming dancing. Dancers often work extremely hard to coordinate these moves with music and sudden freezes, that emphasize form, isolation, and music. So it can be said the form of dance is extremely musically aware. There are a number of lock steps which are often combined with popping. In
When two users simultaneously attempt to access the same data record, this is synchronised by a lock mechanism.When dialog transactions are programmed, locks are set and released by calling certain function modules. These function modules are generated automatically from the definition of so-called lock objects in the ABAP/4 Dictionary. To synchronize the access to a table by setting and removing locks, a Lock object has to be defined in the ABAP/4 Dictionary. Activating the lock object automatically creates function modules for setting and removing locks. These function modules must be included when programming interactive transactions.