Oracle8 Backup and Recovery Handbook

Oracle8 Backup and Recovery Handbook

by Rama Velpuri, Anand Adkoli
     
 

View All Available Formats & Editions

The Oracle Backup and Recovery Handbook is,posibly,the singel-most real-world,solution-oriented title within Oralce Press. This edition,revised for Oracle8,focuses exclusively on issues related to backup and recovery. The book begins with a background discussion on Oracle's architecture,then delves into important topics such as backup principles (physical and… See more details below

Overview

The Oracle Backup and Recovery Handbook is,posibly,the singel-most real-world,solution-oriented title within Oralce Press. This edition,revised for Oracle8,focuses exclusively on issues related to backup and recovery. The book begins with a background discussion on Oracle's architecture,then delves into important topics such as backup principles (physical and logical backups,backup commands); backup scripts (specific scripts to run in a VMS or UNIX environment); recovery principles and methods; and diagnostic tools and debugging techniques. It includes a completely new set of backup and recovery techniques and 10 new case studies which will nearly double the case-study section in page count,adding even more value for our readers. The new case studies cover issues such as tablespace point-in-time recovery; recovering an altered table; and recovering a partitioned table.

Expert Protection for Your Company's Most Valuable Asset.

Protect your data now - and recover what's been lost - using real-world techniques,solutions,and case studies from Rama Velpuri and Anand Adkoli,the world's leading authorities on Oracle database backup and recovery. Now completely revised and updated for Oracle8,this Oracle Press best-seller is essential reading for every Oracle DBA.

  • Understand Oracle8's enhancements for the maintenance of Very Large Databases (VLDBs)
  • Master Oracle8's new backup and recovery features,such as Tablespace point-in-time recovery and Recovery Manager
  • Get in-depth knowledge of Oracle8 on Windows NT
  • Develop critical backup scripts for VMS,Windows NT,and UNIX environments.
  • Gain valuable recovery principles and methods - plus expert backupprinciples for physical and logical backups
  • Implement Oracle8's diagnostic tools and learn new debugging techniques.
  • Discover a completely new set of backup and recovery techniques and find solutions to common Oracle8 user errors
  • Learn directly from real-world backup and recovery case studies on TSPIT recovering altered and partitioned tables,and recovery using rman

Protect your data and your career! Oracle8 Backup & Recovery Handbook is required reading for anyone responsible for strategic data management.

Read More

Product Details

ISBN-13:
9780078823893
Publisher:
Osborne/McGraw-Hill
Publication date:
01/01/1998
Pages:
628
Product dimensions:
7.41(w) x 9.13(h) x 1.47(d)

Read an Excerpt

Chapter 5: Recovery Principles

To understand recovery principles and strategies, you need to understand the underlying data structures used in recovery. This chapter is divided into three sections. First, we define the fundamental data structures of the Oracle RDBMS, followed by a detailed discussion of some of the basic concepts that relate to recovery. An overview of the contents of the control file, log files, and data files is given. Later, we shift our focus to the various recovery options provided by Oracle. We discuss the three main options of recovery-database, tablespace, and data file recovery. in addition to learning the syntax, you will also learn when and how to apply different recovery procedures, depending on the kind of failure. A section is dedicated to the Oracle Recovery Manager that is available with Oracle8.

The final section is on failure analysis. In this section, we first discuss a survey that was done with several Oracle customers regarding system outages. The results show the Mean Time Between Failures (MTBF) of various systems and the Mean Time to Recover (MTTR) when a failure occurs. When a production or a development database goes down, Oracle customers usually call Oracle Worldwide Customer Support and open a priority 1 Technical Assistance Request (TAR). An analysis was done on a sample of priority 1 TARs that shows how the databases are recovered (i.e., what kind of recovery method was chosen). The results of this analysis are given in detail. Based on this information and the real-life experience that we have gained while dealing with mission-critical applications, some recommendations are made on how to plan for a disaster recovery site.

Definitions and Internal Recovery Concepts

The following definitions introduce some fundamental data structures that are used in recovery. Each definition is also followed by a discussion or an example to make the concepts clear.

Redo Generation and Estimation

As mentioned in Chapter 2, the redo log files contain changes made to the database. in this section, we will discuss some of the basic concepts, such as change vectors and redo records, that relate to redo. Some SQL scripts are also provided that help you estimate the amount of redo generated at your site. This is very important, because when you design a backup procedure to back up the archived redo log files, the frequency of this backup depends on it.

Change Vector

A change vector describes A single change made to any single block in the database. Among other information, the change vector contains a version number, the operation code of the transaction, and the address of the data block that this change belongs to. The version number is copied from the data block when the change vector is constructed. During recovery, Oracle reads the change vector and applies the change to the appropriate data block. When a change vector is applied to the data block, the data block's version number is incremented by one.

NOTE: A data block could belong to a data segment, an index segment, or a rollback segment in the database. Redo is not generated for temporary segments.
Redo Record and Its Contents

A redo record is a group of change vectors describing a single atomic change to the database. Some transactions may generate multiple redo records, and each redo record can have a collection of change vectors. Recovery guarantees that all or none of the change vectors of a redo record are applied, no matter what type of system failure occurs. In other words, a transaction is the unit of recovery, so, as a unit, all changes are either applied or not applied. To illustrate the creation of change vectors and redo records, consider the following example transaction, which updates one record in the EMP table:

SQL> update emp set empno=1234 where empno = 9999;

When this UPDATE statement is executed, the sequence of operations is as follows:

1. Change vectors of the redo record are generated.
2. The redo record is saved in a redo log buffer (which eventually gets flushed to the redo log file on disk).
3. The change vectors are applied to the data blocks.
In the example we are using here, the redo record generated in step I contains three change Vectors:
1. The transaction has to write an undo entry to the transaction table of the rollback segment (refer to Chapter 2 for the contents of a rollback segment). Since the transaction table is also another block in the database, entering an undo entry would modify this block and thus generate redo. So, the first change vector of the redo record contains the change for the transaction table.
2. Next, the old value of EMPNO (which is 9999) has to be stored in a block within the rollback segment. This is another modification to a block within the database and therefore generates redo. So, the second change vector contains redo for the undo block.
3. The last and most obvious change is the change to the data block where the EMPNO value is changed to 1234. So, the third change vector is the redo for the data block.

To summarize, the redo record for this transaction contains three change vectors:

  • Change to the transaction table of the rollback segment
  • Change to the rollback segment data block
  • Change to the data segment block belonging to the EMP table
Of course, this may not be the only redo record generated. if, for example, the EMP table has an index on the EMPNO column, then the index key needs to be modified as well and will generate a second redo record (also containing multiple change vectors). Similarly, if a COMMIT statement is issued after this transaction, a third redo record will be created. So, if you lose the data files and have to restore a backup and roll forward, since the unit of recovery is a transaction, all three of these redo records will be applied to keep the database consistent, or none will be applied at all. . . .

Read More

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >