You can restore a database to another host using RMAN.
To restore a database to another host using RMAN
sqlplus <rman user>/<rman password>@<rman service> SQL> select db_key, db_id, bs_key, recid, stamp, backup_type, start_time, status from rc_backup_set;
SVRMGR> select file#, name from v$data file;
orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=kernel.
SVRMGR> startup nomount pfile=$ORACLE_HOME/dbs/init<$ORACLE_SID>.ora
Note: You will need the db_id you obtained in Step 2.
rman rcvcat <rman username>/<rman password>@<rman service>
RMAN> set dbid=<source database db_id value>
RMAN> connect target <username>/<password>;
RMAN> run {
RMAN> allocate channel dev1 type 'sbt_tape';
RMAN> restore controlfile;
RMAN> release channel dev1;
RMAN> }
SVRMGR> alter database mount;
rman target <username>/<password> rcvcat <rman username>/<rman password>@<rman service>
RMAN> run {
RMAN> allocate channel dev1 type 'sbt_tape';
RMAN> set newname for data file 1 to '<new path>'
RMAN> set newname for data file 2 to '<new path>'
...
RMAN> restore database;
RMAN> switch data file all;
RMAN> release channel dev1;
SVRMGR> recover database using backup controlfile until cancel;
SVRMGR> alter database open resetlogs;
SVRMGR> alter database rename file <online redo log #1 path> to <online redo log #1 new path>; ... SVRMGR> alter database rename file <online redo log #n path> to <onlne redo log #n new path>;
SVRMGR> alter database open resetlogs;
Copyright © 2015 |
|