Both the SPFILE and PFILE are located in directory:
$ORACLE_HOME/dbs
SHOW PARAMETER SPFILE;
SELECT name, value FROM v$parameter WHERE name = 'spfile';
-- Para criar o PFILE a partir do SPFILE:
CREATE PFILE='$PATH/PFILE_name' FROM SPFILE='$PATH/SPFILE_name';
-- Para criar o SPFILE a partir do PFILE:
CREATE SPFILE FROM PFILE;
CREATE SPFILE FROM PFILE='/u01/app/oracle/product/12.2.0/dbhome_1/dbs/init.ora'
CREATE SPFILE='/u01/app/oracle/product/12.2.0/dbhome_1/dbs/SPFILE.ora' FROM PFILE='/backup/init.ora'
STARTUP PFILE='/u01/app/oracle/product/12.2.0/dbhome_1/dbs/init.ora';
CREATE SPFILE FROM PFILE='/u01/admin/prod/PFILE/initprod.ora';
-- Necessário Reiniciar, A reinicialização utilizará o SPFILE criado.
SHUTDOWN IMMEDIATE;
STARTUP;
CREATE SPFILE='/u01/app/oracle/product/12.2.0/dbhome_1/dbs/initSID.ora' FROM PFILE='/storage/oracle/initnewdb.ora'
CREATE PFILE ='/u01/app/oracle/product/12.2.0/dbhome_1/dbs/initSID_BACKUP.ora' FROM SPFILE;
CREATE SPFILE FROM MEMORY;
CREATE PFILE FROM MEMORY;
CREATE PFILE='/tmp/initSID.ora' FROM SPFILE;
CREATE PFILE='/tmp/initSID_memory.ora' FROM memory;
CREATE PFILE='/u01/app/oracle/product/VERSAO/db_1/dbs/init.ora' FROM memory;
CREATE PFILE ='/u01/app/oracle/product/VERSAO/db_1/dbs/PFILE.ora' FROM SPFILE='/u01/app/oracle/product/VERSAO/db_1/dbs/SPFILESID.ora';
CREATE SPFILE='/u01/app/oracle/product/VERSAO/db_1/dbs/SPFILESID.ora' FROM PFILE ='/u01/app/oracle/product/VERSAO/db_1/dbs/init.ora';
-- Falha e a solução:
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0.4/db_1/dbs/init.ora';
STARTUP FORCE PFILE='/u01/app/oracle/product/11.2.0.4/db_1/dbs/init.ora';
--STARTUP database with PFILE or SPFILE
STARTUP [NOMOUNT | MOUNT | OPEN] PFILE='/backup/init.ora'
SQL> STARTUP NOMOUNT PFILE='/storage/oracle/initnewdb.ora';
STARTUP PFILE='';
STARTUP SPFILE='';
STARTUP SPFILE='/u01/app/oracle/product/12.2.0/dbhome_1/dbs/SPFILESID.ora';
restore SPFILE to PFILE '/tmp/initnewdb.ora' FROM '/tmp/SPFILESID.ora';
SET DBID 1234567890;
STARTUP FORCE NOMOUNT; # RMAN starts instance with dummy parameter file
RESTORE SPFILE FROM AUTOBACKUP; # restore a server parameter file
STARTUP FORCE; # restart instance with restored server parameter file