ORA-19687
Tried to restore SPFILE from a backup set by RMAN, but it failed with ORA-19687.
RMAN> restore spfile from '/backup/rman/051r6emh_1_1';
...
ORA-19687: SPFILE not found in backup set
ORA-19687 means that the backup set you want to use does not contain SPFILE. You have to choose the right one to restore it.
Solution
We take the following steps to solve it.
Startup to MOUNT by PFILE
RMAN> shutdown immediate;
RMAN> startup mount pfile='/home/oracle/initORCLCDB.ora';
Check Backup Set
To know which backup sets contain SPFILE, you can do this:
RMAN> list backup of spfile;
All available backup sets are shown, you can choose the most appropriate one from the list.
Restore SPFILE
Although there're many ways to restore SPFILE, we use RMAN to align with our topic.
RMAN> restore spfile from '/home/oracle/031r656h_1_1';
If you're pretty the backup piece you choose in the first place is the right one, you may check the content of the backup piece.