Home » RDBMS Server » Backup & Recovery » Restore of a Database to a New Host (Oracle Database 10g 10.1.0.5.0)
Restore of a Database to a New Host [message #353907] Wed, 15 October 2008 09:57 Go to next message
Firearm
Messages: 7
Registered: October 2008
Location: Illinois
Junior Member
I am trying to follow the instructions in the "Advanced RMAN Recovery Techniques" where you can restore and recover the database to a new host. This is simply me wanting to test our recovery in case of a complete loss of our production server.

I have a new host with the Oracle installed and patched.
I have access to the flash recovery area on another server which has control file, spfile, incremental backups, archive logs, etc.

As I understand it from the manual we do not need to create a database prior to the restore.

My question is how do you create the database via RMAN on a new server from backups? I believe when the manual states "Configure the ORACLE_SID" on the new host they mean for me to create the database instance service and configure the tnsnames.ora with the SID. Is that correct or has anyone done anything similar to what I am wanting?
Re: Restore of a Database to a New Host [message #353908 is a reply to message #353907] Wed, 15 October 2008 10:03 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
My question is how do you create the database via RMAN on a new server from backups?

You don't create the database, you restore it from backup.

Quote:
I believe when the manual states "Configure the ORACLE_SID" on the new host they mean for me to create the database instance service and configure the tnsnames.ora with the SID.

No, they just mean: set ORACLE_SID.

Regards
Michel
Re: Restore of a Database to a New Host [message #353909 is a reply to message #353907] Wed, 15 October 2008 10:04 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
you just create the instance with proper entries in init.ora.
Leave instance in nomount stage.
restore.
All steps are clearly outlined in docs.

Regards
Re: Restore of a Database to a New Host [message #353947 is a reply to message #353908] Wed, 15 October 2008 15:34 Go to previous message
Firearm
Messages: 7
Registered: October 2008
Location: Illinois
Junior Member
Thanks for the feedback guys. After a lot of searching on the internet as well as following the Backup and Recovery Advanced User's Guide (chapter on restoring to a new host) I think I have some sucessful procedures. Please take a look at my findings and make any suggestions you might like to add.

Step 1: Create database instance

c:\>set oracle_sid=prodt1
c:\>oradim -new -sid prodt1 -intpwd password -startmode auto -pfile D:\Oracle\product\10.1.0\db_1\database\INITPRODT1.ORA


Step 2: restore the spfile to pfile (so you can make changes)
RMAN>set dbid 1234567890
RMAN>startup nomount
RMAN>restore spfile to pfile 'd:\Oracle\product\10.1.0\db_1\database\initprodt1.ora' from autobackup db_recovery_file_dest='c:\flash_recovery_area' db_name='prodt1';
RMAN>shutdown abort;


review the pfile and change/create paths, memory, or other parameters as needed.
RMAN>startup force nomount;


Step 3: Restore controlfile
RMAN>restore controlfile from autobackup;
RMAN>alter database mount;


Step 4: use sql*plus and get the last scn
c:\>sqlplus '/ as sysdba'
select max(next_change#)-1 from v$archived_log;


Step 5: Restore and Recover
RMAN>run
{
set until scn 95278561;
restore database;
recover database;
}


Step 6: OPEN RESETLOGS
RMAN> ALTER DATABASE OPEN RESETLOGS;



If I were to need renaming or different locations I would follow the guide and use SET NEWNAME and SQL "ALTER DATABASE..." In my situation I created the same SID and Paths on the new host.

Everything seems to be working fine.
Previous Topic: Catalog Datfilecopy error
Next Topic: flashback recovery area
Goto Forum:
  


Current Time: Mon Nov 25 23:16:29 CST 2024