Skip Headers
Oracle® Database Backup and Recovery Advanced User's Guide
10g Release 2 (10.2)

Part Number B14191-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Recovering a Database in NOARCHIVELOG Mode

If a media failure damages datafiles in a NOARCHIVELOG database, then the only option for recovery is usually to restore a consistent whole database backup. If you are using logical backups created by an Oracle export utility to supplement regular physical backups, then you can also attempt to restore the database by importing an exported backup of the database into a re-created database or a database restored from an old backup.

Restoring a NOARCHIVELOG Database to its Default Location

In this scenario, the media failure is repaired so that you are able to restore all database files to their original location.

To restore the most recent whole database backup to the default location:

  1. If the database is open, then shut down the database. For example, enter:

    SHUTDOWN IMMEDIATE
    
    
  2. If possible, correct the media problem so that the backup database files can be restored to their original locations.

  3. Restore the most recent whole database backup with operating system commands as described in "Restoring Datafiles and Archived Redo Logs". Restore all of the datafiles and control files of the whole database backup, not just the damaged files. The following example restores a whole database backup to its default location:

    % cp /backup/*.dbf $ORACLE_HOME/oradata/trgt/ 
    
    
  4. Because online redo logs are not backed up, you cannot restore them with the datafiles and control files. In order to allow the database to reset the online redo logs, you must first mimic incomplete recovery:

    RECOVER DATABASE UNTIL CANCEL
    CANCEL
    
    
  5. Open the database in RESETLOGS mode:

    ALTER DATABASE OPEN RESETLOGS;
    

Restoring a NOARCHIVELOG Database to a New Location

In this scenario, you restore the database files to an alternative location because the original location is damaged by a media failure.

To restore the most recent whole database backup to a new location:

  1. If the database is open, then shut it down. For example, enter:

    SHUTDOWN IMMEDIATE
    
    
  2. Restore all of the datafiles and control files of the whole database backup, not just the damaged files. If the hardware problem has not been corrected and some or all of the database files must be restored to alternative locations, then restore the whole database backup to a new location. For example, enter:

    % cp /backup/*.dbf /new_disk/oradata/trgt/
    
    
  3. If necessary, edit the restored parameter file to indicate the new location of the control files. For example:

    CONTROL_FILES = "/new_disk/oradata/trgt/control01.dbf"
    
    
  4. Start an instance using the restored and edited parameter file and mount, but do not open, the database. For example:

    STARTUP MOUNT
    
    
  5. If the restored datafile filenames will be different (as will be the case when you restore to a different file system or directory, on the same node or a different node), then update the control file to reflect the new datafile locations. For example, to rename datafile 1 you might enter:

    ALTER DATABASE RENAME FILE '?/oradata/trgt/system01.dbf' TO
                               '/new_disk/oradata/system01.dbf';
    
    
  6. If the online redo logs were located on a damaged disk, and the hardware problem is not corrected, then specify a new location for each affected online log. For example, enter:

    ALTER DATABASE RENAME FILE '?/oradata/trgt/redo01.log' TO
                               '/new_disk/oradata/redo_01.log';
    ALTER DATABASE RENAME FILE '?/oradata/trgt/redo02.log' TO
                               '/new_disk/oradata/redo_02.log';
    
    
  7. Because online redo logs are not backed up, you cannot restore them with the datafiles and control files. In order to allow the database to reset the online redo logs, you must first mimic incomplete recovery:

    RECOVER DATABASE UNTIL CANCEL;
    CANCEL;
    
    
  8. Open the database in RESETLOGS mode. This command clears the online redo logs and resets the log sequence to 1:

    ALTER DATABASE OPEN RESETLOGS;
    
    

    Note that restoring a NOARCHIVELOG database backup and then resetting the log discards all changes to the database made from the time the backup was taken to the time of the failure.

    See Also:

    Oracle Database Administrator's Guide for more information about renaming and relocating datafiles, and Oracle Database SQL Reference to learn about ALTER DATABASE RENAME FILE