komminenir
asked on
Rman Backups Restoring Issues
We are taking Production database Rman backups to disk and moving them to tapes. Now we want to restore the rman backup from tapes on to a different server. On the new server the RMAN backup directory structures are different. I have restored the rman backup from tapes to the disk on new server and tried to restore the controlfile and datafiles.
rman>restore controlfile from '.............';
Controlfile restored successfully.
rman>restore database;
ORA-01180: can not create datafile 1
I am getting the above error while restoring the database.
Then i created the directories same as the production database and moved the rman backup files there.
Now the controlfile and datafiles are restored successfully.
Is it mandatory to keep the rman backups in the same directory while performing restore.
rman>restore controlfile from '.............';
Controlfile restored successfully.
rman>restore database;
ORA-01180: can not create datafile 1
I am getting the above error while restoring the database.
Then i created the directories same as the production database and moved the rman backup files there.
Now the controlfile and datafiles are restored successfully.
Is it mandatory to keep the rman backups in the same directory while performing restore.
ASKER
Kumar,
I used SET NEWNAME command but still i am getting the sampe problem. Its not the problem with datafiles.
Exmaple:
Prodcution backup location: /disk10/rmanbackup
Test backup location: /disk9/rmanbackup
In the test database the backup location is /disk9. All the rman backups including the controlfile is in /disk9 in test server.
rman> restore controlfile from '/disk9/rmanbackup/.....' -----> works fine
rman>alter database mount;
rman> restore database;
ORA-01180: can not create datafile 1 --------> gives this error.
When i move the rmanback from /disk9/rmanbackup to /disk10/rmanbackup the restore is successfull.
Now is it mandatory to have the rman backups to be in the same directory structure while restoring.
I used SET NEWNAME command but still i am getting the sampe problem. Its not the problem with datafiles.
Exmaple:
Prodcution backup location: /disk10/rmanbackup
Test backup location: /disk9/rmanbackup
In the test database the backup location is /disk9. All the rman backups including the controlfile is in /disk9 in test server.
rman> restore controlfile from '/disk9/rmanbackup/.....' -----> works fine
rman>alter database mount;
rman> restore database;
ORA-01180: can not create datafile 1 --------> gives this error.
When i move the rmanback from /disk9/rmanbackup to /disk10/rmanbackup the restore is successfull.
Now is it mandatory to have the rman backups to be in the same directory structure while restoring.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Kumar,
Backup location and restoring location on my test server are differnet and to restore the datafiles to a different location i have already used SET NEWNAME command.
I will try to configure the disk channel and will try to restore.
Backup location and restoring location on my test server are differnet and to restore the datafiles to a different location i have already used SET NEWNAME command.
I will try to configure the disk channel and will try to restore.
wait a minute.........show me your RMAN recover script
ASKER
Kumar,
After restoring the backup from tape to disk i used the following commands:
RMAN>startup nomount
RMAN>restore controlfile from '/disk1/rmanbackup/,,,';
RMAN>mount database;
RMAN>{
set newname for datafile 1 to '/disk9/oradata/system01.d bf';
set newname for datafile 2 to '/disk9/oradata/sysaux01.d bf';
set newname for datafile 3 to '/disk9/oradata/undotbs01. dbf';
restore database;
};
I moved the rman backup to the original directory (SAME DIRECTORY LIKE PRODUCTION).
The above three files and all the other datafiles were restored to /disk9/oradata... successfully,
When i tried to recover the database i got the following error. The recover command was looking for system datafile in the same old location.(not the new location where it has been restored)
I connected to sqlplus and renamed the three datafiles manually using
SQL> alter database rename file '/disk10/oradata/system01. dbf' to '/disk9/oradata/system01.d bf'
After renaming the three datafiles i connected to rman and recovered the database. Recovery was successful.
My question is when i used set newname command doesnt it change the location of the file permenantly.
As you have suggested i will allocate a disk channel and try to restore the datafiles today without moving the backup to the original location.
Thanks
After restoring the backup from tape to disk i used the following commands:
RMAN>startup nomount
RMAN>restore controlfile from '/disk1/rmanbackup/,,,';
RMAN>mount database;
RMAN>{
set newname for datafile 1 to '/disk9/oradata/system01.d
set newname for datafile 2 to '/disk9/oradata/sysaux01.d
set newname for datafile 3 to '/disk9/oradata/undotbs01.
restore database;
};
I moved the rman backup to the original directory (SAME DIRECTORY LIKE PRODUCTION).
The above three files and all the other datafiles were restored to /disk9/oradata... successfully,
When i tried to recover the database i got the following error. The recover command was looking for system datafile in the same old location.(not the new location where it has been restored)
I connected to sqlplus and renamed the three datafiles manually using
SQL> alter database rename file '/disk10/oradata/system01.
After renaming the three datafiles i connected to rman and recovered the database. Recovery was successful.
My question is when i used set newname command doesnt it change the location of the file permenantly.
As you have suggested i will allocate a disk channel and try to restore the datafiles today without moving the backup to the original location.
Thanks
ASKER
Thanks for your help. I was able to restore and recover the database.
You can use SET NEWNAME
set newname for datafile 1 to 'disk9/oracle/system.dbf'
then use restore command to restore datafile to new location. RMAN will take care about where to put new file.
Please make sure to use above command inside a part of run block