RESTORE RMAN BACKUP FROM ONE SERVER TO ANOTHER SERVER IN 10G:

  

RESTORE RMAN BACKUP FROM ONE SERVER TO ANOTHER SERVER ON DIFFERENT LOCATION:

 

Lets take two servers as:

SERVER1
SERVER2

ON SERVER1:
DB Name: nsndb

–Take backup of nsndb with archivelog,controlfile and spfile.

–Copy all backupsets from SERVER1(Location: /data1/bak/nsndb/) to SERVER2(Location:/u01/backup/nsndb/)

ON SERVER2:

–Create pfile for database nsndb.
DB Name: nsndb

#export ORACLE_SID=nsndb
#rman target /

RMAN>startup nomount;
RMAN>restore controlfile from '/u01/backup/nsndb/backup_db_c-300166359-20120316-00';
RMAN>alter database mount;

–Since backup location on SERVER2 is different from SERVER1, so we have to use catalog command to
update new backup location in controlfile.
Use below command for all backuppieces:

RMAN>catalog backuppiece '/u01/backup/nsndb/ora_df_020412_21_14_NSNDB_1635_1';
RMAN>catalog backuppiece '/u01/backup/nsndb/ora_df_020412_21_14_NSNDB_1636_1';
RMAN>catalog backuppiece '/u01/backup/nsndb/ora_arch_230412_13_43_NSNDB_23_1';
RMAN>catalog backuppiece '/u01/backup/nsndb/ora_arch_230412_13_43_NSNDB_24_1';

–Since datafile location on SERVER2 is different from SERVER1, So we have to update controlfile for
same with SET NEWNAME clause:
Now restore database backup on SERVER2:

RMAN>
run
{
set newname for datafile '/data02/oradata/nsndb/system01.dbf' to '/u01/oradata/nsnbak/system01.dbf';
set newname for datafile '/data02/oradata/nsndb/undotbs01.dbf' to '/u01/oradata/nsnbak/undotbs1.dbf';
set newname for datafile '/data02/oradata/nsndb/sysaux01.dbf' to '/u01/oradata/nsnbak/sysaux01.dbf';
set newname for datafile '/data02/oradata/nsndb/users01.dbf' to '/u01/oradata/nsnbak/users01.dbf';
restore database;
switch datafile all;
}

RMAN>exit;

–Also update redo log file in controlfile on SERVER2:

#sqlplus "/as sysdba"

SQL>alter database rename file '/data02/oradata/nsndb/redo07.log' to '/u01/oradata/nsnbak/redo07.log';
SQL>alter database rename file '/data02/oradata/nsndb/redo08.log' to '/u01/oradata/nsnbak/redo08.log';
SQL>alter database rename file '/data02/oradata/nsndb/redo09.log' to '/u01/oradata/nsnbak/redo09.log';
SQL>exit;

#rman target /

RMAN>
run
{
recover database;
alter database open resetlogs; }

RMAN>exit;

#sqlplus "/as sysdba"

sql>ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/oradata/nsnbak/temp01.dbf' size 200m reuse;

##END##

 

Request you all to put your valuable comments on  posts of  this blog, will motivate me to write more good post. smiley

 

You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply