Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

Server Parameter File (SPFILE)

Oracle RAC Cluster Tips by Burleson Consulting

This is an excerpt from the bestselling book Oracle Grid & Real Application Clusters.  To get immediate access to the code depot of working RAC scripts, buy it directly from the publisher and save more than 30%.


A server parameter file is basically a repository for initialization parameters.  Initialization parameters stored in an SPFILE are persistent, meaning any parameter changes made while an instance is running can persist across instance shutdown and startup. In this way, all the initialization parameters manually updated by ALTER SYSTEM SET commands become persistent. It also provides a basis for the Oracle database server to self-tune.  Another advantage, particularly for multi-instance RAC systems, is that a single copy of the parameter file can be used by all instances. Even though a single file is used to specify parameters, it has different format styles to support both the common values for all instances, as well as the specific values for an individual instance.

A server parameter file is initially built from the traditional text initialization parameter file, using the create SPFILE statement. It is a binary file that cannot be browsed or edited with a text editor. Oracle provides other interfaces for viewing and modifying parameter settings.

At system startup, the default behavior of the STARTUP command is to read an SPFILE to obtain initialization parameter settings. If the STARTUP command doesn?t have a PFILE clause, it reads the SPFILE from a location specified by the operating system. If the DBA chooses to use the traditional text initialization parameter file, the PFILE clause must be specified when issuing the STARTUP command.

Setting the Server Parameter File Values

Use the SID designator to set instance-specific parameter values in the server parameter file. For settings across the database, use an asterisk (?*?). For a specific instance, set the prefix with SID as indicated below.

*.OPEN_CURSORS=300 # For database-wide setting
RACDB1.OPEN_CURSORS=1500 # For RACDB1 instance

Note that even though open_cursors is set at 300 for all instances in the first entry, the value of 1500 remains in effect for the SID RACDB1.

Some initialization parameters are dynamic since they can be modified using the ALTER SESSION or ALTER SYSTEM statement while an instance is running. Use the following syntax to dynamically alter initialization parameters:

ALTER SESSION SET parameter_name = value
ALTER SYSTEM SET parameter_name = value [DEFERRED]

Use the SET clause of the ALTER SYSTEM statement to set or change initialization parameter values. Additionally, the SCOPE clause specifies the scope of a change as described below:

SCOPE = SPFILE

(For both static and dynamic parameters, changes are recorded in the spfile, to be given effect in the next restart.)

SCOPE = MEMORY

(For dynamic parameters, changes are applied in memory only. No static parameter change is allowed.)

SCOPE = BOTH

(For dynamic parameters, the change is applied in both the server parameter file and memory. No static parameter change is allowed.)

For dynamic parameters, the DEFERRED keyword can also be specified. When specified, the change is effective only for future sessions. Here are some examples.

The following statement affects all instances. However, the values only affect the current instances as they are not written to the binary SPFILE.

ALTER SYSTEM SET OPEN_CURSORS=2000 SID='*' SCOPE=MEMORY;

The next statement resets the value for the instance RACDB1. At this point, the database-wide setting becomes effective for the SID with the value of RACDB1.

ALTER SYSTEM RESET OPEN_CURSORS SCOPE=SPFILE sid='RACDB1';

To reset a parameter to its default value throughout the cluster database, use the command:

ALTER SYSTEM RESET OPEN_CURSORS
SCOPE=SPFILE sid=?*?;

Creating a Server Parameter File

The server parameter file is initially created from a text initialization parameter file (init.ora). It must be created prior to its use in the STARTUP command. The create SPFILE statement is used to create a server parameter file. The following example creates a server parameter file from an initialization parameter file:

CREATE SPFILE FROM PFILE='/u01/oracle/product/920/dbs/initRAC1.ora';

Below is another example that illustrates creating a server parameter file and supplying a name:

CREATE SPFILE='/u01/oracle/product/920/dbs/racdb_spfile.ora'
FROM PFILE='/u01/oracle/product/920/dbs/init.ora';

Exporting the Server Parameter File

The server parameter file can be exported to create a traditional text initialization parameter file.  This would be useful for:

* Creating backups of the server parameter file.

* For diagnostic purposes to list all of the parameter values currently used by an instance.

* Modifying the server parameter file by first exporting it, editing the output file, and then recreating it.

The following example creates a text initialization parameter file from the server parameter file. Since no paths are specified, the files will be located in $ORACLE_HOME/database or its equivalent:

CREATE PFILE FROM SPFILE;

The example below creates a text initialization parameter file from a server parameter file, where the names of the files are specified:

CREATE PFILE='/u01/oracle/product/920/dbs/racdb_init.ora'
FROM SPFILE='/u01/oracle/product/dbs/racdb_spfile.ora';

Refer to Oracle Database 10g Database Reference for all the parameters that can be changed with an ALTER SYSTEM command.

 


This is an excerpt from the bestselling book Oracle Grid & Real Application Clusters, Rampant TechPress, by Mike Ault and Madhu Tumma.

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.

http://www.rampant-books.com/book_2004_1_10g_grid.htm


 

 
��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational