Professional Documents
Culture Documents
SPFILEs
Submitted by admin on Sun, 2003-08-03 19:29
RDBMS Server
When an Oracle Instance is started, the characteristics of the Instance are established by
parameters specified within the initialization parameter file. These initialization parameters are
either stored in a PFILE or SPFILE. SPFILEs are available in Oracle 9i and above. All prior
releases of Oracle are using PFILEs.
SPFILEs provide the following advantages over PFILEs:
o
o
Eliminate configuration problems (no need to have a local PFILE if you want to start
Oracle from a remote machine)
You can also use the V$SPPARAMETER view to check if you are using a PFILE or not: if the
"value" column is NULL for all parameters, you are using a PFILE.
Viewing Parameters Settings:
One can view parameter values using one of the following methods (regardless if they were set
via PFILE or SPFILE):
o
o
V$PARAMETER2 view - display the currently in effect parameter values, but "List
Values" are shown in multiple rows
V$SPPARAMETER view - display the current contents of the server parameter file.
One can override the default location by specifying the PFILE parameter at database startup:
SQL> STARTUP PFILE='/oradata/spfileORCL.ora'
Note that there is not an equivalent "STARTUP SPFILE=" command. One can only use the
above option with SPFILE's if the PFILE you point to (in the example above), contains a single
'SPFILE=' parameter pointing to the SPFILE that should be used. Example:
SPFILE=/path/to/spfile
Use this syntax to set unsupported initialization parameters (obviously only when Oracle Support
instructs you to set it):
SQL> ALTER SYSTEM SET "_allow_read_only_corruption"=TRUE SCOPE=SPFILE;
Execute one of the following command to remove a parameter from the SPFILE:
SQL> ALTER SYSTEM RESET timed_statistics SCOPE=SPFILE SID=*;
SQL> ALTER SYSTEM SET timed_statistics = '' SCOPE=SPFILE;
One can also specify a non-default location for either (or both) the PFILE and SPFILE
parameters. Look at this example:
SQL> CREATE SPFILE='/oradata/spfileORCL.ora' from
PFILE='/oradata/initORCL.ora';
Here is an alternative procedure for changing SPFILE parameter values using the above method:
o
o
Shutdown and startup the database with the PFILE option: STARTUP PFILE=filename
On the next startup, use STARTUP without the PFILE parameter and the new SPFILE
will be used.