Every incomplete recovery is followed by a resetlogs command before opening the database: each time you use a resetlogs command, a new incarnation of the database is created.
While performing incomplete recovery it should be known the target point at which the recovery process needs to terminate: there are several ways to establish and set this recovery point.

Today I’m going to use a time based incomplete recovery, generally used when it’s known the time to which you want to stop the recovery process: in the next posts I will describe scenarios on log-sequence, SCN and cancel-based incomplete recovery.

Let’s first take a backup of the database.

The backup finished at 21:45:39. Now I’m going to simulate some activities on the database.

At 22:12:53 a new software version is deployed into the database.

No real users are still connected to the database: only few people working in the development department are finishing to conduct few regression tests and only when they confirm every thing is working as expected the database could be open to every real users again.

Unfortunately during tests, after 10 minutes they discover a bug has been introduced and they want to rollback all the committed transactions occurred in that short period.

They want to rewind the database just like it was at 22:12:53 time.
To proceed with this operation the database should be in mount mode.

I know exactly when my restore operation has to finish, so I can use the restore … until time option:

I have issue the recover command using again the until time option:

Every incomplete recovery needs to be followed by a resetlogs:

So the database is now available again.
Let’s see if my data are still there just like before inserting new values for the deployment:

Of course also the new tables are no more available.

Thank you for giving your valuable time to read the above information.


For More Detail , You can join us follow:

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.