Previous Topic: Recover Complete Databases and Control FilesNext Topic: Recover Offline Full Backups


Recover Tablespaces or Data Files

If the Oracle database is open, you can restore and recover a tablespace by first placing the tablespace offline.

To recover a tablespace or data file

  1. Take the tablespace offline by entering the following command at the SQL*Plus prompt:
    ALTER TABLESPACE "tablespace_name" OFFLINE;
    

    Note: The Oracle server may take the damaged tablespace offline automatically. If that is the case, go to Step 2.

  2. Restore the tablespace or data file using Arcserve Backup and the Arcserve Backup Agent for Oracle if you have not done so.
  3. Start the database recovery process:

    Oracle checks for the archive redo log files it needs to apply and prompts for the names of these archive redo log files in chronological order.

    For example, when Oracle needs the name of the archive redo log file with a sequence number of 49, it displays the following message:

    ORA-00279:	Change 10727 generated at 09/15/95 16:33:17 needed for thread 1
    ORA-00289:	Suggestion : D:\ORANT|saparch\ARC00049.001
    ORA-00200:	Change 10727 for thread 1 is in sequence #49
    Specify log<<RET>=suggested : filename : AUTO : FROM logsource : CANCEL
    
  4. If you have all the necessary archived log files, enter AUTO to apply the files. Oracle applies the log data to restore the datafiles. After Oracle finishes applying the redo log file, it displays the following message:
    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 returns an error indicating that the log file cannot be opened, the log file may not be available. At the prompt, enter CANCEL. This command stops the complete media recovery. In this case, perform the incomplete media recovery to restore the tablespace again. After all the log files are applied, database recovery is complete. For more information about incomplete media recovery, see the Oracle Server Administrator's Guide.

  5. You can bring the tablespace online by entering the following command:
    ALTER TABLESPACE “tablespace_name” ONLINE;
    

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

Note: For the most reliable database objects recovery, you should back up archived log files using the ~ARCHIVELOG object. For more information on database recovery, see the Oracle documentation.