Q

Restoring RMAN backups to a different server

I do nightly full backups of an Oracle 8i database using RMAN. If I were to lose the entire database server, what steps would I need to take to restore my RMAN backups to a different server?

I do nightly full backups of an 8i database using RMAN. I get the previous two days of archived redo logs and the control file. If I were to lose the entire database server (e.g., fire), what steps would I need to take to be able to restore my RMAN backups to a different server?

Have you read the Oracle Recovery Manager User's Guide and Reference? Everything you should need you can find there.

Here's a bit of what you'll find:

Because your restored database will not have the online redo logs of your production database, you will need to perform incomplete recovery up to the lowest SCN of the most recently archived redo log in each thread and then open the database with the RESETLOGS option.

This scenario assumes that:

  • You are restoring backups from HOST_A onto HOST_B.
  • You are restoring from tape backups.
  • The HOST_A database has the same DB_NAME as the HOST_B database.
  • The HOST_B filenames and directory paths are the same as in HOST_A.
The restore procedure differs depending on whether the target database uses a recovery catalog.

To restore the database from HOST_A to HOST_B with a recovery catalog:

  1. Copy the initialization parameter file for HOST_A to HOST_B using an operating system utility.
  2. Connect to the HOST_B target instance and HOST_A recovery catalog. For example, enter:
      % rman target sys/change_on_install@host_b catalog rman/rman@rcat
  3. Start the instance without mounting it:
      startup nomount;
  4. Restore and mount the control file. Execute a run command with the following sub-commands:
    1. Allocate at least one channel.
    2. Restore the control file.
    3. Mount the control file.
  5. Because there may be multiple threads of redo, use change-based recovery. Obtain the SCN for recovery termination by finding the lowest SCN among the most recent archived redo logs for each thread. Start SQL*Plus and use the following query to determine the necessary SCN:
       SELECT min(scn) 
         FROM (SELECT max(next_change#) scn 
                 FROM v$archived_log 
                GROUP BY thread#);
    
  6. Execute a run command with the following sub-commands:
    1. Set the SCN for recovery termination using the value obtained from the previous step.
    2. Allocate at least one channel.
    3. Restore the database.
    4. Recover the database.
    5. Open the database with the RESETLOGS option.
            run {
                 set until scn = 500;  # use appropriate SCN for incomplete recovery
                 allocate channel ch1 type 'sbt_tape';
                 restore database;
                 recover database;
                 alter database open resetlogs;
            }
      
.. For all the rest see the documentation. Hope this much helps!

This was first published in May 2003

Dig deeper on Oracle database backup and recovery

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close