RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

Today one of our developer accidentally dropped some of application base tables from development instance instead of uat environment. So there was a request re-clone development database from one month old backup which was used for cloning earlier.

Simple!! everything was in proper place including datafile backups, archivelog backups, controlfile backups & cloning scripts too 🙂

I was using following clause for point in time recovery:

SET UNTIL TIME “to_date(’22-07-2014 02:10:00′,’DD-MM-YYYY HH24:MI:SS’)”;

While restoring backup I got following error:

RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time 😦

As error suggests until time was definitely before last resetlogs which was done on 24th July. But from where its getting that information , as I restored controlfile which was definitely before last resetlog.

So definitely database incarnation is the issue:


RMAN> list 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 FIN1 3024510604 PARENT 2704716842 07-JUL-14
2 2 FIN1 3024510604 PARENT 2704717919 07-JUL-14
3 3 FIN1 3024510604 CURRENT 6007342103534 24-JUL-14

So we need to set earlier incarnation in my case ‘2’ to proceed with the restore 🙂


RMAN> reset database to incarnation 2;
database reset to incarnation 2
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 FIN1 3024510604 PARENT 2704716842 07-JUL-14
2 2 FIN1 3024510604 CURRENT 2704717919 07-JUL-14
3 3 FIN1 3024510604 ORPHAN 6007342103534 24-JUL-14

So here restore proceeded without any issues.

Hope so u will find this post very useful 🙂

Cheers

Regards,

Adityanath

8 replies

  1. Appreciating the hard work you put into your blog and detailed information you present.
    It’s awesome to come across a blog every once in a while that isn’t the same old rehashed
    information. Fantastic read! I’ve bookmarked your
    site and I’m adding your RSS feeds to my Google account.

  2. Thank you so much for this! This helped me out. I had done a restore (incomplete recover) on a DB, and then needed to do it again. I got the error, and found this blog, and it solved the probem. Thank you!
    Aaron

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s