Monday, March 30, 2020

Point in time recovery

Here, am going to do a simple recovery.

I have full backup file on 22nd Mar'2020 and archive files till 30th Mar'2020.
Am restoring the full backup and recovering the data only till 7:17 PM of 27th Mar'2020 to meet the business requirement.

[oracle@db2 ~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Tue Mar 31 06:58:51 2020

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: LIVEDB (DBID=2898840116)

RMAN> shutdown immediate;

RMAN> startup mount;

RMAN> Restore database;

OR

run {
set until time="to_date('27032020 19:17:00','ddmmyyyy hh24:mi:ss')";
restore database;
recover database;
}

Note: You can run either.

RMAN> list incarnation;


List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       LIVEDB   2898840116       PARENT  1          24-AUG-13
2       2       LIVEDB   2898840116       PARENT  925702     04-MAY-17
3       3       LIVEDB   2898840116       ORPHAN  923310021  11-NOV-19
4       4       LIVEDB   2898840116       CURRENT 1116960770 31-MAR-20

RMAN> reset database to incarnation 2;

Note: I have changed my incarnation to earlier to the restore point.

RMAN> recover database until time "to_date('27-03-2020 19:17:00', 'DD-MM-YYYY HH24:MI:SS')";

RMAN> Alter database open resetlogs;




No comments:

Post a Comment