Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

What Oracle controlfile for rollforward recovery

Justin BleisteinApr 3 2024 — edited Apr 3 2024

I have an RMAN database backup which runs at let's say 1am. This backup does an autobackup controlfile and plus archive logs. The backup runs for like 10 minutes. I then have archive log RMAN backups which occur every 30 minutes. I loose my database at 5am. I lose everything datafiles and controlfiles. I still have archive logs. I restore the spfile and controlfile taken during the 1 am backup via the RMAN autobackup. I then run restore database to restore the datafiles backed up by RMAN at 1am. It's now time to run recover database. My question is, the controlfile is 4 hours old at this point and doesn't know about the arch logs generated since that 1am backup. Do I need to catalog them first so the controlfile knows about them or will a recover database just apply any log it finds in the archive log destination? I think it's the latter. Note, there have been no structural changes to the database, i.e. new datafile added to a tablespace, etc since the controlfile 1am backup. If the latter is true, that Oracle will just read through all logs present in archive log dest location and apply what it finds to the restored datafiles does the same go for PIT recoveries? If Oracle is just applying logs it finds in that location how does it know when it reaches the target SCN or target time in the case of PIT recoveries? I guess it reads them as it applies them and knows? Sorry for the multiple question post. The crux of my curiosity is if a controlfile backup taken prior to generated arch logs will allow me to rollforward those logs or whether I need a controlfile backup takena after the generation of those logs.

Comments
Post Details
Added on Apr 3 2024
10 comments
130 views