Home > Ask the SAP software/management Experts > Basis administration for Windows Questions & Answers > What is the difference between SPFILE and PFILE in Oracle?
Ask The SAP Expert: Questions & Answers
EMAIL THIS

What is the difference between SPFILE and PFILE in Oracle?

Farooq Ali EXPERT RESPONSE FROM: Farooq Ali

Pose a Question
Other SAP Categories
Meet all SAP Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 25 September 2008
We have SAP ECC6 on Oracle10G. I need to change some Oracle parameters recommended by SAP Early Watch Alert. I need to know where I should set these parameters (SPFILE or PFILE). I also need to know the difference between these two files (since I am new to Oracle 10G). What are their advantages? How can I set parameters in SPFIE and PFILE?


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Basis administration for Windows
Migrating SAP Solution Manager system between Unix platforms
Tips for setting up a default SAP BI client after implementation
How to reset the SAP transport buffer after abnormal patch termination
How to manually add files to an SAP transport queue
Checking HTTP ports in an SAP system
Changing SAP spool servers for all the printers in your QA system
What is the recommended size of Oracle data files for SAP?
Quick analysis of SAP BI objects
Fixing inconsistencies in TemSe and Spool systems
Changing a customer message priority level after it's sent

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


I will answer the second part of your question first (the difference between SPFILE and PFILE). Oracle provides two different types of parameter files that you can use, PFILE and SPFILE.

THE PFILE

Until Oracle 8i, we were using a text file called the PFILE (parameter file) for setting the database initialization parameters. This PFILE is read at instance startup time to get specific instance characteristics. The PFILE is text based, and can be edited in an editor like vi on UNIX or Notepad on Windows. Any changes that were made in PFILE would only take effect when the database is restarted

Since SAP/Oracle recommends using SPFILE over PFILE, I will provide some details on SPFILE to answer your question in more detail.

THE SPFILE

In Oracle9i, a new feature called SPFILE (server parameter file) was introduced. SPFILE is a binary file that contains the same information as the old PFILE. SPFILE permits dynamic changes without requiring you to restart that instance.

By default, if you do not specify PFILE in your STARTUP command, Oracle will use server parameter file (SPFILE). If you choose to use the traditional text initialization parameter file (PFILE), you must specify the PFILE clause when issuing the STARTUP command.

The SPFILE is different from the PFILE in that it can not be directly edited. This is because it has a header and footer that contain binary values. Since you can not change a SPFILE directly, Oracle allows you to manage the SPFILE via the ALTER SYSTEM command.

When you execute the ALTER SYSTEM command, the parameter change is validated immediately, which helps avoid errors associated with entering an incorrect parameter name or an invalid value. In addition, the ALTER SYSTEM allows you to specify whether you want to update the parameter immediately, update just the SPFILE, or both. All these features help avoid human error associated with manually updating a PFILE.

The following example shows how to change the current value of SESSIONS and store the value in the SPFILE.

SQL> ALTER SYSTEM SET SESSIONS=200 SCOPE=SPFILE; The new part in this command is the parameter SCOPE. You have the following options for this.

SCOPE = SPFILE

(For both static and dynamic parameters, changes are recorded in the spfile, and will take 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 (SPFILE) and memory. No static parameter change is allowed.)

For dynamic parameters, we can also specify the DEFERRED keyword. When specified, the change is effective only for future sessions.

Now for the first part of your question. Since you are using Oracle 10G, you have to use the ALTER SYSTEM command to change the Oracle parameters as recommended by the SAP Early Watch Alert.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SAP White Paper Topics
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
SearchSAP.com is a search service provided by TechTarget and is completely
independent of and not affiliated with SAP AG.
  TechTarget - The IT Media ROI Experts