Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

   
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 

Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation

 

 


 

 

 

        
 

 Oracle Row Locks and Row Level Locking
Oracle Tips by Burleson Consulting

Oracle 11g Grid & Real Application Clusters by Rampant TechPress is written by four of the top Oracle database experts (Steve Karam, Bryan Jones, Mike Ault and Madhu Tumma).  The following is an excerpt from the book.

Row-level locks are the locks that protect selected rows. When a transaction updates or modifies a row, its transaction identifier is recorded in the entry as a part of the transaction list. The list is located in the header of the data block itself, and the row header is modified to point to the transaction list entry. The following statements create row-level locks:

  • INSERT

  • UPDATE

  • DELETE

  • SELECT with the FOR UPDATE clause

These row locks or row-level locks are stored in the block, and each lock refers to the global transaction lock. As in the case of a single instance, Oracle RAC controls concurrency down to the row level. The finest lock granularity is at the row level.

 

However, to keep the cache coherent, access to the data blocks is controlled by the GCS. This has no effect on the row-level lock. GCS resources and row locks operate independently of the GCS. An instance can request or ship the data block to another instance in the cluster without affecting the row-level locks that are held inside the data block. The row-level lock is fully controlled by the transaction that causes the row-level lock. When the transaction commits or rolls back, the row-level lock is released. In the meantime, if another transaction intends to update the same row, it has to wait until the initial transaction commits or rolls back.

 

The row lock method has an important advantage in maintaining data consistency, even if there are multiple instances, as in the RAC system. The behavior of the row lock and the release is the same, whether it is a single standalone database or a multi-instance RAC system. During the row lock period, even if the data block gets transferred to another instance, the row lock remains intact until released.

Global Resource Directory

The GES and GCS together maintain a Global Resource Directory (GRD) to record information about resources and enqueues. The GRD remains in memory and is stored on all the instances. Each instance manages a portion of the directory. The distributed nature of the GRD is a key point for the fault tolerance of RAC.

 

The GRD is an internal database that records and stores the current status of the data blocks. Whenever a block is transferred out of a local cache to another instance’s cache, the GRD is updated. The following resource information is available in GRD:

  • Data Block Addresses (DBA) - This is the address of the block being modified

  • Location of most current version of the data block. This exists only if multiple nodes share the data block.

  • Modes of the data blocks - (N)Null, (S)Shared, and (X)Exclusive

  • The roles of the data blocks (local or global) - This indicates the role in which the data block is being held by the instance.

  • SCN – System Change Number

  • Image of the Data Block – It could be past image or current image. Current image represents the copy of the block held by the current instance. Past image represents the global dirty data block image maintained in the cache.

     

Remote DBA Service
 

Oracle Tuning Book

 

Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

 

 

 

 

 

 

 

 

 

BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright © 1996 -  2013 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.