Tag Archives: Determine if the Database is Running with spfile or pfile

How to identify Oracle Startup Mode: PFILE or SPFILE?

How to check if Oracle instance was started with pfile or spfile

Spfile/pfile is having information required by oracle to start the database.If you donot have the file then you are not able to start the oracle database. At least one from both file must be available.

During startup command process:
1. Check spfile if found start
2. otherwise check pfile if found start
3. otherwise check init.ora default file present

Spfile having parameter which have defined some value which tells oracle about location of files needed by oracle to start database and some feature disabled or enabled through it. How much memory need to allocated in Operating system.

Startup command automatically check the file spfile/pfile availability at Default location. If you want to start database from different location you can give location of pfile in startup command also
startup pfile=’location’

Check the database started with pfile or spfile:

SELECT DECODE(value, NULL, 'PFILE', 'SPFILE') "Init File Type"  FROM sys.v_$parameter WHERE name = 'spfile';

Or 
-- If spfile path is specified then its run from spfile otherwise pfile
Show parameter spfile

Create the spfile from pfile

SQL> create spfile from pfile='location';

Create the pfile from spfile:

Create pfile from spfile;
OR
Create pfile='location' from spfile;

What is the command to start database with Pfile?

Startup pfile='location'
Example:
startup pfile='C:\pfile.txt'