Jump to Navigation

179 - pfile vs sfile in Oracle

  • pfile

Specify the name of the text parameter file you want to create. If you do not specify pfile_name, Oracle Database uses the platform-specific
default initialization parameter file name.

  • sfile

Specify the name of the binary server parameter from which you want to create a text file. If you specify spfile_name, then the file must exist on
the server. If the file does not reside in the default directory for server parameter files on your operating system, then you must specify the full path.

If you do not specify spfile_name, then the database looks in the default directory for server parameter files on your operating system, for the
platform-specific default server parameter file name, and uses that file. If that file does not exist in the expected directory, then the database
returns an error.

The following example creates a text parameter file my_init.ora from a binary server parameter file production.ora :

SQL> CREATE PFILE = 'my_init.ora' FROM SPFILE = 's_params.ora';

The following example creates a default server parameter file from a client initialization parameter file named t_init1.ora :

SQL> CREATE SPFILE FROM PFILE = '$ORACLE_HOME/dbs/my_init.ora';

Change the method to read the parameters :

SQL> ALTER SYSTEM SET <parameter>=<value> scope=spfile;

SQL> shutdown immediate

SQL> startup

 

 



Main menu 2

Story | by Dr. Radut