Oracle7 Server Administrator's Guide

Contents Index Home Previous Next

Performing Incomplete Media Recovery

This section descrines the steps necessary to complete the different types of incomplete media recovery operations, and includes the following topics:

See Also: Do not rely solely on this section to understand the procedures necessary to recover from a media failure. Also see "Examples of Media Failures and Appropriate Recovery Procedures" [*] for a detailed list of the different types of problems that media failures can cause, and the appropriate methods of recovery from each type of problem.

Changing the System Time on a Running Database

If your database is affected by seasonal time changes (for example, daylight savings time), you may experience a problem if a time appears twice in the redo log and you want to recover to the second, or later time. To deal with time changes, perform cancel-based or change-based recovery to the point in time where the clock is set back, then continue with the time-based recovery to the exact time.

Performing Cancel-Based Recovery

This section describes how to perform cancel-based recovery.:

To Perform Cancel-Based Recovery

Note: If a database control file cannot function or be replaced with a control file backup, you must edit the parameter file associated with the database to modify the CONTROL_FILES parameter.

Note: Files in read-only tablespaces should be offline if you are using a control file backup. Otherwise, recovery will try to update the headers of the read-only files.

Opening the Database After Successful Cancel-Based Recovery

The first time you open the database subsequent to incomplete media recovery, you must explicitly specify whether to reset the log sequence number by including either the RESETLOGS or NORESETLOGS option. Resetting the redo log:

Warning: Resetting the redo log discards all changes to the database made since the first discarded redo information. Updates entered after that time must be re-entered manually.

	RESETLOGS after complete recovery through change scn

	RESETLOGS after incomplete recovery UNTIL CHANGE scn

If you reset the redo log sequence when opening the database, immediately shut down the database normally and make a full database backup. Otherwise, you will not be able to recover changes made after you reset the logs. Until you take a full backup, the only way to recover will be to repeat the procedures you just finished, up to resetting the logs. (You do not need to back up the database if you did not reset the log sequence.)

After opening the database using the RESETLOGS option, check the ALERT log to see if Oracle7 has detected inconsistencies between the data dictionary and the control file (for example, a datafile that the data dictionary includes but does not list in the new control file).

If a datafile exists in the data dictionary but not in the new control file, Oracle7 creates a placeholder entry in the control file under MISSINGnnnn (where nnnn is the file number in decimal). MISSINGnnnn is flagged in the control file as being offline and requiring media recovery. The actual datafile corresponding to MISSINGnnnn can be made accessible by renaming MISSINGnnnn, so that it points to the datafile only when the datafile was read-only or offline normal. If, on the other hand, MISSINGnnnn corresponds to a datafile that was not read-only or offline normal, then the rename operation cannot be used to make the datafile accessible, because the datafile requires media recovery that is precluded by the results of RESETLOGS. In this case, the tablespace containing the datafile must be dropped.

See Also: See "Creating Additional Copies of the Control File, and Renaming and Relocating Control Files" [*].

For more information about creating datafiles, see "Restoring Damaged Datafiles" [*].

To relocate or rename datafiles, see "Renaming and Relocating Datafiles" [*], as necessary.

For more information about listing datafiles, see "Listing Database Files Before Backup" [*].

For more information about applying redo logs, see "Applying Redo Log Files" [*].

Performing Time-Based Recovery

When you are performing time-based, incomplete media recovery, and you are recovering with a backup control file and have read-only tablespaces, contact Oracle Support before attempting this recovery procedure.

To Perfrom Time-Based Recovery

Note: If a database control file cannot function or be replaced with a control file backup because the hardware problem causing the media failure persists, you must edit the parameter file associated with the database to modify the CONTROL_FILES parameter.

Note: Files in read-only tablespaces should be offline if you are using a control file backup. Otherwise, the recovery will try to update the headers of the read-only files.

	ALTER DATABASE DATAFILE 'users1' ONLINE;

Opening the Database After Successful Time-Based Recovery

The first time you open the database subsequent to incomplete media recovery, you must explicitly specify whether to reset the log sequence number by including either the RESETLOGS or NORESETLOGS option. Resetting the redo log:

Warning: Resetting the redo log discards all changes to the database made since the first discarded redo information. Updates entered after that time must be re-entered manually.

	RESETLOGS after complete recovery through change scn

	RESETLOGS after incomplete recovery UNTIL CHANGE scn

If you reset the redo log sequence when opening the database, immediately shut down the database normally and make a full database backup. Otherwise, you will not be able to recover changes made after you reset the logs. Until you take a full backup, the only way to recover will be to repeat the procedures you just finished, up to resetting the logs. (You do not need to back up the database if you did not reset the log sequence.)

After opening the database using the RESETLOGS option, check the ALERT log to see if Oracle7 has detected inconsistencies between the data dictionary and the control file (for example, a datafile that the data dictionary includes but does not list in the new control file).

If a datafile exists in the data dictionary but not in the new control file, Oracle7 creates a placeholder entry in the control file under MISSINGnnnn (where nnnn is the file number in decimal). MISSINGnnnn is flagged in the control file as being offline and requiring media recovery. The actual datafile corresponding to MISSINGnnnn can be made accessible by renaming MISSINGnnnn, so that it points to the datafile only when the datafile was read-only or offline normal. If, on the other hand, MISSINGnnnn corresponds to a datafile that was not read-only or offline normal, then the rename operation cannot be used to make the datafile accessible, because the datafile requires media recovery that is precluded by the results of RESETLOGS. In this case, the tablespace containing the datafile must be dropped.

See Also: See "Creating Additional Copies of the Control File, and Renaming and Relocating Control Files" [*].

For more information about creating datafiles, see "Restoring Damaged Datafiles" [*].

To relocate or rename datafiles, see "Renaming and Relocating Datafiles" [*], as necessary.

For more information about listing datafiles, see "Listing Database Files Before Backup" [*].

For more information about applying redo logs, see "Applying Redo Log Files" [*].

Performing Change-Based Recovery

This section describes how to perform change-based recovery.

To Perform Change-Based Recovery

Note: If a database control file cannot function or be replaced with a control file backup, you must edit the parameter file associated with the database to modify the CONTROL_FILES parameter.

Note: Files in read-only tablespaces should be offline if you are using a control file backup. Otherwise, recovery will try to update the headers of the read-only files.

	ALTER DATABASE DATAFILE 'users1' ONLINE;

Opening the Database After Successful Change-Based Recovery

The first time you open the database subsequent to incomplete media recovery, you must explicitly specify whether to reset the log sequence number by including either the RESETLOGS or NORESETLOGS option. Resetting the redo log:

Warning: Resetting the redo log discards all changes to the database made since the first discarded redo information. Updates entered after that time must be re-entered manually.

	RESETLOGS after complete recovery through change scn

	RESETLOGS after incomplete recovery UNTIL CHANGE scn

If you reset the redo log sequence when opening the database, immediately shut down the database normally and make a full database backup. Otherwise, you will not be able to recover changes made after you reset the logs. Until you take a full backup, the only way to recover will be to repeat the procedures you just finished, up to resetting the logs. (You do not need to back up the database if you did not reset the log sequence.)

After opening the database using the RESETLOGS option, check the ALERT log to see if Oracle7 has detected inconsistencies between the data dictionary and the control file (for example, a datafile that the data dictionary includes but does not list in the new control file).

If a datafile exists in the data dictionary but not in the new control file, Oracle7 creates a placeholder entry in the control file under MISSINGnnnn (where nnnn is the file number in decimal). MISSINGnnnn is flagged in the control file as being offline and requiring media recovery. The actual datafile corresponding to MISSINGnnnn can be made accessible by renaming MISSINGnnnn, so that it points to the datafile only when the datafile was read-only or offline normal. If, on the other hand, MISSINGnnnn corresponds to a datafile that was not read-only or offline normal, then the rename operation cannot be used to make the datafile accessible, because the datafile requires media recovery that is precluded by the results of RESETLOGS. In this case, the tablespace containing the datafile must be dropped.

See Also: See "Creating Additional Copies of the Control File, and Renaming and Relocating Control Files" [*].

For more information about creating datafiles, see "Restoring Damaged Datafiles" [*].

To relocate or rename datafiles, see "Renaming and Relocating Datafiles" [*], as necessary.

For more information about listing datafiles, see "Listing Database Files Before Backup" [*].

For more information about applying redo logs, see "Applying Redo Log Files" [*].


Contents Index Home Previous Next