DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: How to restore a database via RMAN but different DB_NAME?

  1. #1
    Join Date
    Apr 2001
    Location
    Congleton
    Posts
    258

    How to restore a database via RMAN but different DB_NAME?

    I am trying to restore a database from RMAN but using a different DB_NAME/SID. The 'new' database is called DEV and I want to restore from an RMAN backup. Unfortunately, there is another db on the server called PROD, and the OLD PROD database is unavailable, hence the restore from rman backups.
    I have managed to restore the controlfile from rman, but when I try to mount this database, so I can restore the datafiles, it says ORA-01103: database name 'PROD' in control file is not 'DEV'
    Thanks. Rgds. Sheryl

  2. #2
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    Go through this ...

    http://download.oracle.com/docs/cd/B...b.htm#i1008564

    Go to "Preparing the RMAN DUPLICATE Auxiliary Instance: Basic Steps" section.

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  3. #3
    Join Date
    Apr 2001
    Location
    Congleton
    Posts
    258
    Unfortunatly the 'old' prod (target) database is unavailable, therefore I can't use the duplicate database in rman.

    And as the old prod is unavailable (server down), I can't use the 'tried and tested' method of 'Hot backups', copying the datafiles across and re-creating the controlfile. I have to use the RMAN backups from tape.

  4. #4
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Talking Use recoevry from backup controlfile

    Use the RMAN Restore and Recovery of the Database on a New Host or Recovery with a Backup Control File which do not require connectivity to the source db.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  5. #5
    Join Date
    Apr 2006
    Posts
    377
    Once you have restored/recovered the database simply use the nid to rename the database.

  6. #6
    Join Date
    Apr 2001
    Location
    Congleton
    Posts
    258
    Hi, Thanks for the information. The problem is the 'HOST', I am restoring to already has a database called PROD and if I restore will it overwrite the existing PROD database?
    Rgds. Sheryl

  7. #7
    Join Date
    Apr 2006
    Posts
    377
    To avoid overwriting anything for the current PROD database, you can modify where the files are restored to by following the process indicated in Restore of a Database to a New Host.

  8. #8
    Join Date
    Apr 2001
    Location
    Congleton
    Posts
    258
    Hi, I am using the note 'Restore and Recover database on a new host', but I have come across another problem.

    As I couldn't copy the rman backup files to the same directory structure as the orginal backup, the RESTORE DATABASE always errors with 'can not create datafile 1'. I assume this is because rman can't find the backuppiece sets, so I then catalog these backuppieces, but I still get the error. Thanks.

  9. #9
    Join Date
    Apr 2001
    Location
    Congleton
    Posts
    258
    I have managed to sort this out. In the RMAN Documentation, its uses 'SET SCN 12345', but in a metalink note 419137.1, it uses 'SET SEQUENCE 12345'. I changed the SCN to SEQUENCE and now it is restoring the database. Very unusual...

    Rgds. Sheryl

  10. #10
    Join Date
    Jan 2009
    Posts
    3
    One other option that you could also explore is, to install a new oracle home on the same server, edit the initialization file to set the db_name to PROD and restore the backup to a new location using the set new name command for each datafile.

    Basically, RMAN expects that the db_name parameter matches with the name of the database in the control file. In one oracle home, you cannot have databases with same name..Hence, as a temporary workaround, you could setup a new oracle home, complete the recovery there, nid the database to rename it to DEV.

    You could later get rid of this temporary oracle home and manage it from the original Oracle home.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width