You are on page 1of 2

SPFILE AND PFILE

-----------------SPFILE (Server Parameter file):


SPFILE is a binary file.
Spfile contains all database parameters for starting the
instance.
Every database must contain one spfile.
Without spfile we cannot start the instance or database server.
when we type startup first it will read spfile by default.
Spfile contains control file information.
The syntax of spfile is
spfile<SID>.ora located at /u01/app/oracle/product/10.2.0/db_1/dbs/spfileorc
l.ora for linux
<drivename>:\oracle\product\10.2.0\db_1\dbs\spfileorcl.ora for windows
spfileorcl.ora
The advantage of spfile is we can change the database parameters dynamically
by using alter system command
syntax:
sql> alter system set parameter = value;
eg:
sql> alter system set sga_max_size=300M;

PFILE (Parameter file):


This is a text based file so we can edit and modify the parameters.
If we modify any parameters in pfile we have to bounce the database server.
In oracle 10g no pfile.

syntax of a pfile is
init<SID>.ora located at /u01/app/oracle/product/10.2.0/db_1/dbs/init<SID>.or
a for linux
eg: initorcl.ora
<drivename>:\oracle\product\10.2.0\db_1\database\initorcl.ora

How to create pfile from spfile?


syntax:
sql> create pfile from spfile;
spfile is corrupted.
When we start an instance by default oracle will read spfile.
It won't read pfile.
How to create spfile from pfile?
syntax:
sql> create spfile from pfile;

You might also like