Oracle8i Server and Tools Administrator's Guide
Release 3 (8.1.7) for Alpha OpenVMS

Part Number A86712-01

Library

Contents

Index

Go to previous page Go to next page

7
Recovering Your Data

If the server is interrupted by a hardware failure, an operating system error, or an unexpected process termination, the result can be damaged files or a database that contains inconsistent data. Recovery is then needed to reconstruct the database in such a way that no committed transactions are lost and no uncommitted changes are retained.

This chapter describes the procedures for recovering data if media, software, or system fails. You must complete database backups periodically to be able to recover data if you have a media failure.

This chapter contains the following major sections:

Overview

Recovering an Oracle8 database is the process of restoring normal Oracle8 operations when they are interrupted by operating system error, hardware failure, or process termination. Recovery procedures should ensure that no transactions are lost and that no data is written incorrectly. Consequently, you must back up the database regularly.

The first step in recovering normal Oracle8 operation is to determine the type of failure that has occurred. There are four types of failure, but only two require any action:

When either instance or media failure occurs, you need to complete instance or media recovery.

The other two types of failure, statement failure and process failure, result in automatic recovery. For more information about statement and process failure, refer to the Oracle8 Server Administrator's Guide.

Instance recovery is done automatically whenever an instance is started. It can be performed after instance failure by shutting down and then restarting the instance. Media recovery is similar to instance recovery, but requires the use of database backups or archived redo logs.

Both instance and media recovery consist of the following two tasks:

Refer to the Oracle8 Server Administrator's Guide and to the Oracle8 Server Utilities for information about the Oracle8 utilities used in recovery procedures.

Recovering from Instance Failure

An instance has failed when work executed within the instance has stopped, meaning that read and write transactions are no longer being processed. Instance failure can be caused by loss of power, machine malfunction, an operating system crash, or another hardware or software problem. You can diagnose instance failure by checking if one or more of the detached processes have terminated, or if work in the instance seems to be suspended.

To recover from instance failure, simply restart the failed instance to restore it to the working state that existed immediately before it failed. Whenever an instance is started, the following occurs:

To restart an instance after it has failed, perform the following steps:

  1. Shut down the instance with the command SHUTDOWN. You must use either the IMMEDIATE or ABORT option with the command.

  2. Restart the instance with the command STARTUP as normal.

When the instance is restarted, check the trace files generated in the dump directory by the detached processes. Sometimes the failure of one or more of the detached processes will cause instance failure. If possible, the problem that caused process failure should be diagnosed and corrected to avoid recurrence of the problem.

On OpenVMS Clusters where multiple instances reside on different CPUs, a failed instance will be recovered by one of the remaining functional instances within the cluster. You must still restart the failed instance, however.

Recovering from Media Failure

A media failure occurs when a nonrecoverable error occurs during a read or write transaction involving one or more of the database files. For example, a disk head crash that causes the loss of any one of the log files, control file, and database files associated with a particular database constitutes media failure. If you prepared for media failure properly, you can restore both the system tablespace datafiles and the non-system tablespace datafiles.

Media Recovery

Media recovery achieves the same results as instance recovery. However, because media failure usually involves loss of data in the database files, media recovery usually requires the use of database backups and archived redo logs. Consequently, you cannot complete a full media recovery automatically as these backups and archived logs are kept offline. Full media recovery requires rather extensive preparation before media failure actually occurs; the following sections describe the actions involved in this preparation.

The procedures for recovering these structures are documented in the Oracle8 Server Administrator's Guide.


Note:

If you run in parallel mode, you must shut down all instances and start up only one instance in exclusive mode to do media recovery. 


If you have suffered from media failure, it is unlikely that any of the instances are still operational.

If you need to use an archived redo log file during any of these procedures, use the OpenVMS BACKUP utility to copy the archived file from the archive destination. When prompted to supply the log file sequence number, provide the file specification. Provide the full specification if the location is other than the current device and directory. Wildcards are not accepted.

Restoring from an Export File

Refer to the Oracle8 Server Utilities for information on how to restore from an export file as part of media recovery. If you decide to import from an export file as part of media recovery, you need to recreate the database using the Server Manager utility before importing the export file.

  1. Back up the current database, redo log, and control files with the OpenVMS BACKUP utility.

  2. Edit the ORA_DB:CREATE_<dbname>.COM file and modify any parameters if desired (for example, increasing the initial data file's size).

  3. CONNECT to Oracle8 as SYSTEM and run the CATDBSYN.SQL script from the ORA_RDBMS_ADMIN directory.

  4. Create a second rollback segment in the SYSTEM tablespace. Refer to the Oracle8 Server Administrator's Guide for more information on creating rollback segments.


Note:

Private rollback segments can be taken online manually while the database is open using the following SQL command:

SQL> ALTER ROLLBACK SEGMENT <name> ONLINE;
 


Go to previous page Go to next page
Oracle
Copyright © 2000 Oracle Corporation.

All Rights Reserved.

Library

Contents

Index