Home » RDBMS Server » Backup & Recovery » Question abour restoring to diff. Server via RMAN
Question abour restoring to diff. Server via RMAN [message #122161] Fri, 03 June 2005 08:20 Go to next message
Uwe
Messages: 260
Registered: February 2003
Location: Zürich, Switzerland
Senior Member
Hi all,

I try to recover a database to a second database. I use RMAN and our script is running fine.
But If I need to get archivelog-files which are created after the restore was started and the arc-files are backuped in between to tape RMAN won't get them directly.
If I start a log-restore I could restore them to the original Server. How could I enforce RMAN to restore the arc-files to a new location ?
Will it be possible to place this inside my full_restore script ?
I run the scripts on the auxiliary box where I do need the restored Database.

I will post the script in parts here :

################################################################
# Restore Database / Clone Database
################################################################
rman <<EOF
connect target sys/passwd@<target_SID>;
connect auxiliary sys/passwd@<Aux_sid>;
run {
set until time "to_date('2005-06-02:02:00:00','yyyy-mm-dd:hh24:mi:ss')";
allocate auxiliary channel c1 type 'sbt_tape';
allocate auxiliary channel c2 type 'sbt_tape';
allocate auxiliary channel c3 type 'sbt_tape';
allocate auxiliary channel c4 type 'sbt_tape';
allocate auxiliary channel c5 type 'sbt_tape';
set newname for datafile 1 to '/u02/oradata/AMRDEV/system01.dbf';
set newname for datafile 2 to '/u03/oradata/AMRDEV/undotbs01.dbf';
set newname for datafile 3 to '/u05/oradata/AMRDEV/drsys01.dbf';
set newname for datafile 4 to '/u05/oradata/AMRDEV/example01.dbf';
set newname for datafile 5 to '/u03/oradata/AMRDEV/perfstat01.dbf';
set newname for datafile 6 to '/u05/oradata/AMRDEV/users01.dbf';
set newname for datafile 7 to '/u05/oradata/AMRDEV/tools01.dbf';
set newname for datafile 8 to '/u04/oradata/AMRDEV/tmvxld01.dbf';
set newname for datafile 9 to '/u05/oradata/AMRDEV/tmvxmd01.dbf';

.....

SET ARCHIVELOG DESTINATION TO '/u08/AMRDEV/arch/';
duplicate target database to 'AMRDEV'
logfile
group 1 ('/u06/oradata/AMRDEV/redo101.log', '/u07/oradata/AMRDEV/redo102
.log') size 104858112,
group 2 ('/u06/oradata/AMRDEV/redo201.log', '/u07/oradata/AMRDEV/redo202
.log') size 104858112,
group 3 ('/u06/oradata/AMRDEV/redo301.log', '/u07/oradata/AMRDEV/redo302
.log') size 104858112;
}
EOF

################################################################# Script for Logfile restore
################################################################

rman <<EOF
connect target sys/passwd@target_Sid>;
connect auxiliary sys/passwd@Aux_Sid;
run
{
allocate channel d1 type 'sbt_tape';
allocate channel d2 type 'sbt_tape';
allocate channel d3 type 'sbt_tape';
allocate channel d4 type 'sbt_tape';
allocate channel d5 type 'sbt_tape';
SET ARCHIVELOG DESTINATION TO '/u02xp/AMRSPS/arch';
restore archivelog from logseq 2148 until logseq 2200 thread 1;
release channel d1;
release channel d2;
release channel d3;
release channel d4;
release channel d5;
}
EOF
Re: Question abour restoring to diff. Server via RMAN [message #126389 is a reply to message #122161] Mon, 04 July 2005 03:30 Go to previous message
shettyshetty
Messages: 18
Registered: June 2005
Location: Malaysia
Junior Member
Hello Uwe,

Maybe it's too late to respond, but still..

You dont need to specify the path for archive log destination in your restore scripts.
RMAN restores the archive logs to the destination specified in the init.ora file of AUXILARY database.

duplicate target database to 'AMRDEV'
pfile=<path of init.ora for auxiliary DB>
logfile
group 1 ('/u06/oradata/AMRDEV/redo101.log', '/u07/oradata/AMRDEV/redo102
.log') size 104858112,
group 2 ('/u06/oradata/AMRDEV/redo201.log', '/u07/oradata/AMRDEV/redo202
.log') size 104858112,
group 3 ('/u06/oradata/AMRDEV/redo301.log', '/u07/oradata/AMRDEV/redo302
.log') size 104858112;
}



Sunil

Previous Topic: How to Export & Import a Tablespace and part of a table
Next Topic: Export problem of user schema ....Urgent help needed
Goto Forum:
  


Current Time: Fri Mar 29 03:55:48 CDT 2024