For Oracle support & training call (800) 766-1884
Free Oracle Tips

Home
Oracle Tips
Oracle Code Depot
Oracle Monitoring
Oracle Consulting
Oracle Training
Oracle News
Oracle Forum
Oracle Support





 

Free Oracle Tips

image

 
HTML Text

Free Oracle App Server Tips

image

 
HTML Text


Privacy Policy

Redneck

Dress Code

Oracle tuning

Oracle training

Oracle support

Remote Oracle


 

   
  Oracle Tips by Burleson

Oracle10g Grid Computing with RAC
Chapter 13 - Oracle RAC Backup and Recovery

Overview of RAC Backup and Recovery

Believe it or not, other than a few quirks, which we shall discuss in detail, RAC backup and recovery is identical to almost all other Oracle database backup and recovery operations. When you get down to the basic level you are, after all, only backing up a single Oracle Database 10g database. 

In most cases, an instance failure will be recovered by other RAC instances. We will cover special cases of instance failure at the end of the chapter.

The quirks come into play when dealing with a RAC database that uses archive logging. Archive logging introduces an added layer of complexity, due to the requirement that all archive logs from all instances in the RAC environment must be backed up. Luckily, Oracle Database 10g allows the database to archive log to more than one destination, and with a little ingenuity on your part, you can ensure all archive logs are available for recovery at all times.

Oracle Database 10g RAC offers a multitude of backup possibilities:

  • Export

  • Overview of RAC Backup and Recovery

    • Cold backup using scripts

    • Hot backup using scripts

    • RMAN backup with a catalog

    • RMAN backup without a catalog

    • Using third party tools to perform backup and restore operations

    All of these options have their good and bad qualities.

    Export

    A database export is a logical copy of the structure and data contained in an Oracle database. You cannot apply archive log information against a database recovered using the import of an export file. This means that an export is a point-in-time copy of a database. In this way, an export is like a cold backup of a database that is not in archive log mode.

    Exports are useful in that they allow easy restoration of tables and other structures, instead of having to bring back entire tablespaces, as you would with most other forms of backup and recovery. The import process can also be used to rebuild tables and indexes into more optimal configurations or to place data into new locations. Another benefit is that exports are capable of being copied across platforms. For example, an export from a WIN2K server can be copied to a Solaris server and applied there.

    The drawbacks to exports are that they take a great deal of time to generate (depending on database size), they can only be performed against a running database, and they take a long time to recover (again based on database size). In some versions of Oracle, there are also file size limitations.


  • Hot Backup Using Scripts

    A hot backup is taken while the database is operating. A special command places the database’s tablespaces into backup mode that copies live files. Once the copy operation in a hot backup is complete, the datafiles are taken out of backup mode.

    In order to use hot backup the database must be in archive log mode. Once the datafiles are copied, the archive logs that were generated while the datafiles were in backup mode are also copied to the backup location. The datafile backups and the archive logs are then used to recover the database to the exact state it was in at the end of the backup.

    Once the backup is complete, any subsequent archive logs can be applied, in order to recover to any point in time between the backup and the last available archive log.

    As mentioned, the database is active and in use during a hot backup. This allows a 24/7 shop to operate without having to shut down to backup the database

     

    Hot Backup Using Scripts

    Drawbacks of the Hot Backup Include:

    • Database performance can degrade during the backup

    • All archive logs generated during the backup process must be captured

    • The scripting for a hot backup can be quite complex.

    A Few Words on Using Manual Scripts

    Manual scripts should be generated using SQL and PL/SQL routines against the data dictionary of an operating database. This allows the addition of a tablespace, or a change in an archive log destination, to be automatically engineered into the script. Most attempts to manually maintain backup scripts ultimately end in disaster, as a DBA misses a new tablespace or other structural element and thus, it is not backed up.

    In RAC the gv$ and dba_ series of views should be used to create dynamically generated cold and hot backup scripts. Examples of hot and cold backup script generators are available on the Rampant website, using the username and password provided with this book. These scripts have been tested under WIN2K and UNIX environments, but should be thoroughly tested on your own system before relying on them.


    RMAN (Recovery Manager)

    Using RMAN with OEM (Oracle Enterprise Manager) allows for the scheduling of backup jobs with automated notification capabilities. Using OEM requires that Oracle Intelligent Agents be running on all RAC nodes. The configuration of Oracle Intelligent Agents can sometimes be complex and the DBA needs to be very careful in the setup of the OEM agents in a RAC environment. In later sections, we will look at various RMAN scenarios in detail.

    Third Party Solutions

    Many providers of SAN and NAS storage also provide backup capabilities with their hardware. Complete backups of databases can be maintained with no impact on database operations with the use of shadow volumes or the so-called Third Mirrors (EMC’s Business Continuance Volumes - BCV). Recovery using third party solutions can also be incredibly fast, as these solutions often either mirror the entire database to a second location or provide only for backup of changed blocks.

    Backup of RAC Databases

    As we discussed earlier, the two major backup modes are cold, where the database is shutdown, and hot, where the database is open and in use. An Oracle DBA can use either of these modes to backup a RAC database. However, since the main reason for utilizing Oracle RAC is to provide uninterrupted service to your customer base, it makes little sense to use a cold backup with RAC because it requires the shutdown of all instances that are using the Oracle database.

     


For more information, see the book Oracle 11g Grid and Real Application Clusters  - 30% off if you buy it directly from Rampant TechPress . 

Written by top Oracle experts, this RAC book has a complete online code depot with ready to use RAC scripts.

Customized Oracle Training Classes

Burleson Consulting offers on-site Oracle courses year-round in a variety of Oracle topics.  All on-site Oracle training can be custom fit to meet your specific training needs.  For customized syllabus development or a price quote, please visit www.fast-track.cc or email .

  
 

 
 
 
 
Oracle performance tuning software
 
 

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 

 

Fast-Track Oracle Support
PO Box 511
Kittrell, NC 27544


Email BC: