Home » RDBMS Server » Backup & Recovery » rman restore on new server - set newname not working? (10.2.0.4 ee windows 2008 64bit)
rman restore on new server - set newname not working? [message #543370] Tue, 14 February 2012 07:43 Go to next message
davekeep
Messages: 3
Registered: February 2012
Junior Member
hi.
I am trying to restore a backup from a live server to a dev server. Have moved nackup sets. Created a windows service to match the old sid on live system. copied the pfile from live and changed the locations of the folders to suit dev. set oracle_sid to the new sid(as created to match live)
connected to rman
startup nomount
set dbid to the live number
restore controlfile
alter database mount
catalog'd all the backupsets
list backup of archivelog all to get low SCN from most recent archive log backup
run {set until sequence nnnnnnnnn from above;}
run {set newname for datafile 1 to 'mynewfilepath' ... repeated for all the other datafiles
;}
then did
RESTORE DATABASE;
SWITCH DATAFILE ALL;
RECOVER DATABASE;

but it fails when it tries the restore .. see below ..
The path it is showing is the old path from the live server, so it appears to eb ignoring my set newname statements even though they succeeded earlier - should be restoring them to d:\oracle\oradata\sun43dev ? Can u help?
Does the whole thing have to be put inside one run block or can I put bits in one run block and other bits outside of it etc?

RMAN> restore database;

Starting restore at 14-FEB-12
using channel ORA_DISK_1
using channel ORA_DISK_2

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:\ORACLE\ORADATA\SUN43\SYSTEM01.DBF
restoring datafile 00004 to D:\ORACLE\ORADATA\SUN43\USERS01.DBF
restoring datafile 00005 to D:\ORACLE\ORADATA\SUN43\USERS02.DBF
restoring datafile 00006 to D:\ORACLE\ORADATA\SUN43\USERS03.DBF
restoring datafile 00008 to D:\ORACLE\ORADATA\SUN43\UNDOTBS02.DBF
channel ORA_DISK_1: reading from backup piece D:\ORACLE\BACKUP\SUN43_20120208_GC
N2R45L_1_1
channel ORA_DISK_2: starting datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
restoring datafile 00002 to D:\ORACLE\ORADATA\SUN43\UNDOTBS01.DBF
restoring datafile 00003 to D:\ORACLE\ORADATA\SUN43\SYSAUX01.DBF
restoring datafile 00007 to D:\ORACLE\ORADATA\SUN43\USERS04.DBF
restoring datafile 00009 to D:\ORACLE\ORADATA\SUN43\USERS05.DBF
restoring datafile 00010 to D:\ORACLE\ORADATA\SUN43\USERS06.DBF
channel ORA_DISK_2: reading from backup piece D:\ORACLE\BACKUP\SUN43_20120208_GB
N2R45L_1_1
ORA-19870: error reading backup piece D:\ORACLE\BACKUP\SUN43_20120208_GCN2R45L_1
_1
ORA-19504: failed to create file "D:\ORACLE\ORADATA\SUN43\USERS03.DBF"
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
Re: rman restore on new server - set newname not working? [message #543372 is a reply to message #543370] Tue, 14 February 2012 07:47 Go to previous message
John Watson
Messages: 7255
Registered: January 2010
Location: Global Village
Senior Member
Please read the OraFAQ Forum Guide and How to use [code] tags and make your code easier to read

As you say, you must do this in one run block: the SET NEWNAME does not persist from one block to another.
Previous Topic: why the table does not exists?
Next Topic: Backup process explanation step by step 'Command line only please'
Goto Forum:
  


Current Time: Sat Feb 17 16:22:46 CST 2018

Total time taken to generate the page: 0.06728 seconds