PFILE is a text file and can be edited in any editor.
SPFILE is a binary file and has to be modified using the ALTER SYSTEM statement. The syntax to modify the SPFILE is given as follows:
ALTER SYSTEM=
SCOPE=
COMMENT=
slD=*/
The SCOPE parameter, in the preceding syntax, can be set to SPFILE, MEMORY, or BOTH:
1. MEMORY— Set for the current instance only. This is the default behavior if a PFILE was used at startup.
2. SPFILE — Update the'SPFILE, the parameter will take effect with next database startup. BOTH (SPFILE and MEMORY).
Affect the current instance and persist to the SPFILE. This is the default behavior if an SPFILE was used at startup.
The COMMENT parameter (optional) specifies a user remark.
The SID parameter (optional; only used with RAC) indicates the instance for which the parameter applies (default is *: all Instances).
An alternative procedure for changing the SPFILE parameter values is given as follows:
i. Export the SPFILE with: CREATE PFILE=xpfilename' FROM SPFILE = 'spfilename';
ii. Edit the resulting PFILE with a text editor
iii. Shutdown and startup the database with the PFILE option: STARTUP PFILE=flename
iv. Recreate the SPFILE with: CREATE SPFILE='spfilename' FROM PFILE=xpfilename';
v. On the next startup, use STARTUP without the PFILE parameter and the new SPFILE will be used.
SPFILE is a binary file and has to be modified using the ALTER SYSTEM statement. The syntax to modify the SPFILE is given as follows:
ALTER SYSTEM
SCOPE=
COMMENT=
slD=*/
The SCOPE parameter, in the preceding syntax, can be set to SPFILE, MEMORY, or BOTH:
1. MEMORY— Set for the current instance only. This is the default behavior if a PFILE was used at startup.
2. SPFILE — Update the'SPFILE, the parameter will take effect with next database startup. BOTH (SPFILE and MEMORY).
The COMMENT parameter (optional) specifies a user remark.
The SID parameter (optional; only used with RAC) indicates the instance for which the parameter applies (default is *: all Instances).
An alternative procedure for changing the SPFILE parameter values is given as follows:
i. Export the SPFILE with: CREATE PFILE=xpfilename' FROM SPFILE = 'spfilename';
ii. Edit the resulting PFILE with a text editor
iii. Shutdown and startup the database with the PFILE option: STARTUP PFILE=flename
iv. Recreate the SPFILE with: CREATE SPFILE='spfilename' FROM PFILE=xpfilename';
v. On the next startup, use STARTUP without the PFILE parameter and the new SPFILE will be used.