TEST
Powered by Blogger.
Responsive Ad
Responsive Ad

Author Profile

About Me

Start Sharing

Start Sharing

Drive Traffic on Social Platforms

Blog Archive

Blog Journey

Blog Journey

Learn how to start a perfect Blog

Work Smart, Not Hard - Let's See

Make your Blogging experience faster and easiest …
Work Smart, Not Hard - Let's See
Design by - Blogger Templates | Distributed by Free Blogger Templates

Made with Love by

Material UI Template is Designed Theme for Giving Enhanced look Various Features are available Whic…

Random Posts

Ads Section

HOME > > Time-Based, Change-Based, or SCN-based Incomplete Recovery

Time-Based, Change-Based, or SCN-based Incomplete Recovery

Anup - Friday, 20 May 2011

Incomplete recovery uses a backup to produce a non-current version of the database. In other words, you do not apply all of the redo records generated after the most recent backup.

You usually perform incomplete recovery of the whole database in the following situations:

  1. Media failure destroys some or all of the online redo logs.
  2. A user error causes data loss, for example, a user by mistake drops a table.
  3. You cannot perform complete recovery because an archived redo log is missing.
  4. You lose your current control file and must use a backup control file to open the database.

To perform incomplete media recovery, you must restore all datafiles from backups created prior to the time to which you want to recover and then open the database with the RESETLOGS option when recovery completes. The RESETLOGS operation creates a new incarnation of the database; in other words, a database with a new stream of log sequence numbers starting with log sequence 1.

NOTE – Start every RMAN incomplete recovery with the following commands:

$ sqlplus "/ as sysdba"

SQL> shutdown abort;
SQL> startup mount;

$ rman target /
-
-For time-based recovery, use these commands:

RMAN> restore database until time "to_date('07/12/05 12:0:00','MM/DD/YY
HH24:MI:SS')";

RMAN> recover database until time "to_date('07/12/05 12:0:00','MM/DD/YY HH24:MI:SS')";

media recovery complete

SQL> alter database open resetlogs;

--For SCN-based recovery, user these commands:

RMAN> restore database until scn 1000;
RMAN> recover database until scn 1000;
media recovery complete.

SQL> alter database open resetlogs;

--For change-based recovery, user these commands:

RMAN> restore database until sequence 9923;   --Archived log sequence number
RMAN> recover database until sequence 9923;   --Archived log sequence number

media recovery complete.

SQL> alter database open resetlogs;

Contact me

Get in Touch

Need to get touch with me? Please fill out the form with your enquiry.

Name
Anup Srivastav
Address
Lucknow - Utter Pradesh
Email
myindiandba@gmail.com
Message me