Create SPFILE and PFILE in Oracle
SPFILE is called as Server parameter file. It has defined the initialization parameters which need to run the oracle database.
Startup command will first check the SPFILE location for initialization parameter if it not found then it go to Pfile. Pflie is the text file and SPFILe is binary file.
You can directly user the PFILE while startup the database with following syntax:
--start from pfile
startup pfile='location'
--start from spfile
startup
Note: if spfile not present then it check for pfile.
Default location of SPFILE:
In UNIX or Linux : Oracle_Home/dbs
In Windows: Oracle_home/database.
Create SPFILE from PFILE
Create spfile from pfile;
CREATE SPFILE FROM PFILE='/u01/oracle/dbs/init.ora';
Create PFILE from SPFILE
create pfile from spfile;
CREATE SPFILE FROM PFILE='/u01/oracle/dbs/init.ora';
Create spfile='location' from pfile='location';
Note: If you do not specify the location then it will check default location and name.
Create SPFILE from Memory
Create spfile from Memeory;