Oracle Database Blog‎ > ‎Backup & Recovery‎ > ‎RMAN‎ > ‎

How restore SPFILE

RMAN> connect target /
RMAN> set dbid DB_ID
RMAN> startup force nomount
 
-- Restore spfile to default location (default is for last 7 days)
RMAN> restore spfile from autobackup;
 
-- Restore spfile to default location (set number of days)
RMAN> restore spfile from autobackup maxdays 20; -- for instance, last 20 days.
 
-- Restore spfile to other location
RMAN> restore spfile to '/tmp/' from autobackup;
 
-- Restore spfile to pfile
RMAN> restore spfile to pfile '/tmp/init.ora';