Access RMAN Backups of Old Oracle Incarnations
Quick Tip
When you need to access an old backup but the current database has been changed, duplicated or restored with resetlogs, you have to tell RMAN the exact previous DBID and Incarnation from the time the backup was taken.
Access Old Backup
To setup RMAN to access old backups follow these steps:
- Get the DBID and Incarnation using command
list incarnation of database
- Set the database id using command
set dbid
- Set the incarnation using command
reset database to incarnation
First get the list of incarnations:
RMAN> list incarnation of database ;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
77793547 77818648 PATODB 1380000018 PARENT 9460880553691 20-OCT-19
77793547 77793548 PATODB 1380000018 CURRENT 9460880687987 21-OCT-19
82721833 82723417 PATODB 1393720406 PARENT 9391138077038 03-MAR-20
82721833 82721834 PATODB 1393720406 CURRENT 9556600865638 24-MAR-20
As we want to restore a backup from February 2020 we need to point to the database id 1380000018
and the incarnation 77793548
:
RMAN> set dbid=1380000018
executing command: SET DBID
database name is "PATODB" and DBID is 1380000018
RMAN> reset database to incarnation 77793548 ;
RMAN> list backup of database;
And that’s it, we can access now backups generated in the time frame of that combination of DBID and Incarnation.