Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

UNDO Management in RAC

Oracle RAC Cluster Tips by Burleson Consulting

The Oracle database uses undo segments for undo transactions. They are also used to provide read-consistent images. Traditionally, Oracle maintained rollback segments to store the undo records. Undo records are used for three main purposes. These purposes are:

* Undo records provide read consistency by maintaining the before image of the data.

* Multi-version read consistency models require that users always have access to consistent data. Even though many concurrent users access and modify the same set of data blocks, every user has to get consistent data, and data integrity has to be maintained.

* During database recovery, undo records are used to undo any uncommitted changes applied from the redo log to the data file. Data integrity is maintained even though a failure occurred during active transactions.

* When the user issues a rollback statement during an active transaction, the undo records are used to undo changes that were made to the database by the uncommitted transaction.

Oracle databases have used rollback segments for a long time. But with release 9i, a new method of undo process was introduced which stores the records in a tablespace. Tablespace-based automatic undo management avoids the tedious management of rollback segments. It is considered a good practice to use the automatic undo method for managing undo segments in Oracle Database 10g. However, the manual rollback segments can be used as well. Therefore, there are two modes of rollback or undo methods:

* Automatic ? Automatic Undo Management (AUM) designates the rollback segments as Undo Segments.

* Manual ? Follows the traditional method of manually creating the rollback segments.

The mode can be set at instance startup using the undo_management initialization parameter. In the automatic undo management system, the undo segments are internally managed by Oracle. The following initialization parameter setting causes the STARTUP command to start an instance in automatic undo management mode:

UNDO_MANAGEMENT = AUTO

An undo tablespace must be available for Oracle to store undo records. The specific tablespace is defined at startup by setting the undo_tablespace initialization parameter. In RAC there must be one UNDO tablespace for each instance. For example:

RACDB1.undo_tablespace=UNDO1TBS
RACDB2.undo_tablespace=UNDO2TBS

Undo Management in RAC

Oracle recommends using the automatic undo method for rollback purposes in a RAC system. Each instance in the RAC system can only use one undo tablespace at a time. In other words, instances cannot share undo tablespaces. Each instance in the cluster, being an independent transaction-processing environment, maintains its own UNDO area for undo management. 

Either automatic undo management or rollback segment undo can be used to manage undo space. If the automatic rollback method will be used, set the global parameter undo_management to auto in the server parameter file, and set the undo_tablespace parameter to assign the undo tablespace to the instance.

The RAC system allows the creation and use of several undo tablespaces.  When the instance is started, it uses the first available undo tablespace. A second instance will use another undo tablespace. Thus, each instance in a RAC system will have exclusive access to a particular undo tablespace at a given time. The undo tablespace cannot be shared among the instances at the same time. Only once an undo tablespace is released by an instance, it can be assigned to another instance. However, all instances can read blocks from any or all undo tablespaces for the purpose of constructing read-consistency images.

If the need arises, an idle undo tablespace can be utilized. This feature is useful for switching to a new undo tablespace located in a different file system, or utilizing a new undo tablespace that is larger in size.

For the purpose of executing a large batch process at night, a new undo tablespace can be utilized. This way, the instance keeps running without any down time. At the time of the switch, the instances maintain control of both the old and new undo tablespaces. The old undo tablespace is marked as pending-offline until all the transactions using it are completed.

Undo tablespaces can be dynamically redirected by executing the ALTER SYSTEM SET UNDO_TABLESPACE statement. For example, assume instances RAC1 and RAC2 are accessing undo tablespaces undotbs01 and undotbs02 respectively. Using an idle undo tablespace, undotbs03 for example, the following statement can be executed from either instance to redirect undo processing to undotbs03.

ALTER SYSTEM SET UNDO_TABLESPACE = undotbs3;

The undo tablespace is usually defined when the database is created by using the CREATE DATABASE statement as shown in the following example:

CREATE DATABASE racdb
.
.
UNDO TABLESPACE undotbs_01
DATAFILE '/u01/oracle/rbdb1/undo_01' SIZE 1024M;

The undo tablespace can also be defined after the database is created, as shown here in this example:

Create UNDO tablespace UNDOTBS_3
DATAFILE ?/u01/oracle/rbdb1/undo_3? SIZE 512M ;

If an undo tablespace runs out of space, or to prevent it from doing so, add files to it or resize the existing data files. The following example adds a data file to the undo tablespace undotbs_3:

ALTER TABLESPACE undotbs_3
ADD DATAFILE ?/u01/oracle/rbdb1/undo_31? SIZE 128M ;

 
   
Oracle Grid and Real Application Clusters

See working examples of Oracle Grid and RAC in the book Oracle Grid and Real Application Clusters.

Order directly from Rampant and save 30%. 
 

 


 

 
��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational