What is the main difference between latch and lock?

Options
- Lock is used to protect data while latch is not
- Locks are more restrictive than Latches in that they are always exclusive
- Latches are more restrictive than locks in that they are always exclusive
- Latch is used to protect data while lock is not


CORRECT ANSWER : Latches are more restrictive than locks in that they are always exclusive

Discussion Board
Latches are more restrictive than locks in that they are always exclusive

Latches differ from locks within Oracle in terms of duration with respect to restricting access to data structures for transactions and processes with the database. Latches are short term in length of operation and locks are long duration in restricting access to Oracle data structures. As such, latches are lightweight serialization and locks are the heavy duty long running serialization mechanism. However, latches are strict compared to locks in terms of restricting access to data structures within Oracle.

Prajakta Pandit 03-14-2017 04:29 AM

Actually iam not clear about the question but as per my knowledge :

Latches are internal to the SQL engine and are used to provide memory consistency, whereas locks are used by SQL Server to provide logical transactional consistency.

kamran yousaf 08-5-2014 04:20 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement