Restore Oracle database to another location Using RMAN

we have RMAN hot backup for our production database , as full backup per week and incremental per day .
we need now to restore our RMAN backup that has been taken three weeks ago to the new database with the same name of production database in another server.
we have created a new database , then we tried to do restore the following message appears :
##########################################################################
RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
##########################################################################
we list the incarnation :
###########################################################################
using target database control file instead of recovery catalog

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       PROD     118797296        PARENT  179879045  30-DEC-09
2       2       PROD     118797296        CURRENT 179891892  30-DEC-09
##########################################################################
and we are trying to restore before date 30-DEC-09 .

can anyone help us to solve this issue ?

Thanks


GHOSINIAsked:
Who is Participating?
 
FayyazCommented:
The full command is "RESET DATABASE TO INCARNATION 118797296"
Anyway, there is no need to create new database separately. Take the RMAN backup of existing database and restore it on new server. it will create automatically database and restore it. after this you can recover it using archive logs (if applicable) or using incremental backups.
If directory structure is same on new server, then just allocate the channels and restore database. Hopefully you will have the restore database script, sample is also pasted for reference:
rman target /
run {
allocate channel dev1 type disk;
allocate channel dev2 type disk;
allocate channel dev3 type disk;
allocate channel dev4 type disk;
allocate channel dev5 type disk;
allocate channel dev6 type disk;
restore database;
release channel dev1;
release channel dev2;
release channel dev3;
release channel dev4;
release channel dev5;
release channel dev6;
}
0
 
AsrCommented:
Hi,
use the RESET DATABASE TO INCARNATION command
because RECOVERY WINDOW cannot be less than the database creation time or RESETLOGS time.
0
 
GHOSINIAuthor Commented:
what is the rest of command :

RESET DATABASE TO INCARNATION .................................

we list the incarnation :
###########################################################################
using target database control file instead of recovery catalog

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       PROD     118797296        PARENT  179879045  30-DEC-09
2       2       PROD     118797296        CURRENT 179891892  30-DEC-09
############################################################################

I want it before the Reset time appears above .

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
GHOSINIAuthor Commented:
Hi
the database is already created .
i want the database to be restored before this incarnation 118797296 .
is it possible or not ?

thanks
0
 
FayyazCommented:
If you have old controlfile and backup related to previous incarnation then yes
0
 
GHOSINIAuthor Commented:
because the problem hasn't been totally solve yet
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.