Windows – Restoring Oracle prod backup to test server with new database name

oracleoracle-11g-r2restorewindows

I need to restore an Oracle production database (aaprod) to a test server that already is home to a test database (aatest) under a new name (bbtest). I have a cold backup of the production database

Questions: What is the appropriate approach to restoring this production database to a test server under a new database name using the cold backup?

Easy to do with SQL Server, Oracle is a new gig.

Best Answer

rule #1) use rman for backup, recovery and cloning of databases.

since this was a user managed backup, and you need your datafiles on a different location, there are a few things to do.

  1. 1) copy the file to where you want
  2. 2) create a pfile.ora that references your control_files
  3. 3) startup mount your database

at this moment you have control_files that still refer to the original datafiles locations. They need to be redirected.

  1. 4) for all your files in v$datafile, issue "alter database rename file '/old/name' to '/new/name';
  2. 5) for all your members in v$logfile, issue "alter database rename file '/old/name' to '/new/name';

now you should be able to open your database.

  1. 6) alter database open;

If you get problems before or during mount, it is probably because of wrong dbname, db_unique_name. Set them as they were/are in prod.