To restore spfile, the auto backup of your control file should be enabled and have already taken a backup after enabling the controlfile auto backup feature of RMAN.
1 | RMAN> configure controlfile autobackup on ; |
We can restore the spfile either using a recovery catalog or RMAN autobackup from default location(FRA).
- Using Recovery Catalog:
1234
$ rman target / catalog rcat/rcat@rcatdb
RMAN> startup nomount;
RMAN> restore spfile;
RMAN> startup
force
;
- RMAN Auto Backup in Default Location:
12345
$ rman target /
RMAN> startup
force
nomount;
RMAN>
set
dbid 1436686810;
RMAN> restore spfile
from
autobackup;
RMAN> startup
force
;
We can also restore spfile from a non-default location of RMAN controlfile autobackup:
1 2 3 4 5 6 | $ rman target / RMAN> set dbid 768943403; RMAN> startup force nomount; RMAN> restore spfile from '+FRA/autobackup/2022_09_25/o2_mf_s_443335437_31fbttrl_.bkp' ; RMAN> startup force ; |
meda Changed status to publish 25/09/2022