Previous Topic: Restore System, or Undo Tablespaces or Data FilesNext Topic: Restore Control Files


Restore All Tablespaces and Data Files

You can restore all the tablespaces and data files. Before you restore, you must locate the file. When you locate the files, ensure that the database is in the Open state. If the database is open, use the ALTER TABLESPACE. OFFLINE statement to take the tablespaces or datafiles offline before you begin the restore process.

Follow these steps:

  1. Log in to the computer where you want to restore the tablespaces or datafiles.
  2. Locate the user tablespaces or datafiles using the following command:
    SQL> SELECT FILE_NAME, TABLESPACE_NAME FROM DBA_DATA_FILES;
    
  3. Change the state of the database to mount, or nomount, or shutdown before you restore the tablespaces or datafiles.
    SQL> STARTUP MOUNT;
    
    SQL> STARTUP NOMOUNT;
    
    SQL> SHUTDOWN IMMEDIATE;
    
  4. Log in to the Arcserve UDP Console.
  5. Restore the tablespaces or datafiles using the Restore Wizard. For more information on the restore process, see How to Restore From a Recovery Point.
  6. Log in to the destination computer.
  7. Navigate to the specific folders and verify that the tablespaces or datafiles are restored.
  8. Recover the database.
    SQL> RECOVER DATABASE;
    

    Oracle checks for the archive redo log files that it needs to apply and displays the names of the files in a sequence.

  9. Enter AUTO in the SQL*Plus prompt screen to apply the files.

    Oracle applies the log files to restore the data files. After Oracle finishes applying the redo log file, it displays the following messages:

    Applying suggested logfile
    
    Log applied
    

    After each log is applied, Oracle continues to apply the next redo log file until the recovery is complete.

    Note: If Oracle displays an error indicating that the log file cannot be opened, the log file may not be available. In such cases, perform the incomplete media recovery to recover the database again. After all the log files are applied, the database recovery is complete. For more information about incomplete media recovery, see the Oracle documentation.

  10. Enter the following command to bring the database online:
    SQL> ALTER DATABASE OPEN;
    

    The database is now recovered to the last available log file.

Note: If you perform an incomplete media recovery, enter the following command to change the database to the open state:

SQL> ALTER DATABASE OPEN RESETLOGS;