Restore of a Database to a New Host [message #353907] |
Wed, 15 October 2008 09:57 |
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 #353947 is a reply to message #353908] |
Wed, 15 October 2008 15:34 |
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.
|
|
|