Home > Ask the Oracle Experts > Database Design and Architecture Questions & Answers > Functions of PFILE, SPFILE and INIT.ORA
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Functions of PFILE, SPFILE and INIT.ORA

Brian Peasland EXPERT RESPONSE FROM: Brian Peasland

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


Oracle tips, scripts, and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 09 August 2007
What is the difference between the PFILE, SPFILE and INIT.ORA, and what is the function of each? Thank you.

>
EXPERT RESPONSE

In the "old days," Oracle kept its parameters in a text file. By default, this parameter file's name was of the form initsid.ora where "sid" is replaced by the ORACLE_SID value. So if ORACLE_SID=ORCL, the parameter file was named "initorcl.ora." When two DBAs have a conversation about the parameter file, their SIDs may be different, so they refer to this parameter file as the "INIT.ORA" file. They just remove the SID from the file name, but it is implied.

Back in the old days, many of the initialization parameters were not dynamically modifiable. If you wanted to use a different set of parameters for weekend batch processing compared to online use during the week, the DBA would have two parameter files -- two INIT.ORAs. Now the DBA could not name them the same if they were in the same directory. So the DBA might have one parameter file called "init_weekday.ora" and another called "init_weekend.ora." To change the parameter values, the DBA would shut down the database Friday evening at 6 p.m. and start it up with the weekend's parameter values. Monday morning at 5 a.m., the database was restarted with the weekday's parameter values. The PFILE parameter of the STARTUP command could instruct Oracle to start with a specific Parameter FILE (PFILE) like:

STARTUP PFILE=/home/oracle/7.3/dbs/init_weekend.ora

Oracle DBAs would refer to the initialization parameter file as either the INIT.ORA or the PFILE. They are the same thing. The PFILE (INIT.ORA) is a text file which can be edited with any text editor.

In Oracle 9i, the binary parameter file was introduced. This is called the SPFILE (Server Parameter File). The SPFILE replaces the PFILE. For the most part, you can use the PFILE or the SPFILE, but not both. The SPFILE is a binary file and is not edited with any text editor. Instead, you modify the parameter's values with the ALTER SYSTEM SET command. For information on these parameter files, please refer to the following Oracle documentation:

Initialization Parameter Files and Server Parameter Files

Managing Initialization Parameters Using a Server Parameter File

There are benefits to the SPFILE over the PFILE. Since the SPFILE was introduced in Oracle 9i, I do not use the old PFILE any more. Some Oracle functionality does not work as well if you are not using the SPFILE. The self-tuning SGA works best when using a SPFILE as Oracle can store some information abou the SGA components in the SPFILE. THe SPFILE can hold parameters for multiple Oracle instances, something that is very important in a Real Application Clusters (RAC) environment. Oracle's Recovery Manager (RMAN) can automatically back up the SPFILE's contents while it cannot back up the PFILE.


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


RELATED CONTENT
Database Design and Architecture
How to set up a job for an SQL query in Oracle 10g Grid Control
Why am I getting the ORA-03113 error when trying to refresh a materialized view?
Receiving the ORA-01652 error with no specified tablespace
Why am I getting an Oracle error when issuing the RECOVER DATABASE command?
Can I add multiple datafiles and make use of all the temporary datafiles at the same time?
What's the best tape backup strategy for 10g RAC?
Checkpoint vs. commit process
How does an INSERT/UPDATE statement behave when executed compared to a SELECT statement?
Can I resize the SYSTEM tablespace?
What is the difference between an instance and mounting in Oracle?

Oracle tutorials, tips and FAQs
How to create a database link in Oracle
Most clicked stories of 2007
How do I do that in Oracle?
Counting a row's NULL columns
How many redo log files?
How to start multiple instances in Oracle 10g
Is it possible to assign a role to a profile?
Difference between RECYCLEBIN and 'DROPPED' column
How to find transactions being committed to Oracle database
What is the System Global Area (SGA)?
Oracle tutorials, tips and FAQs Research

Oracle database design
Weighing remote database administration pros and cons takes care
Oracle Database 11g makes waves at Burlington Coat Factory
How to create a database link in Oracle
Data modeling tools no substitute for hard work
How do I do that in Oracle?
The Oracle Database user's guide to Oracle OpenWorld 2007
Oracle OpenWorld 2007 Special Report
How many redo log files?
How to move tables from system tablespace to user tablespace
ORA-12560 error with Oracle 10g Instant Client

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
10g  (SearchOracle.com)
delimiter  (SearchOracle.com)
extent  (SearchOracle.com)
field  (SearchOracle.com)
flexfield  (SearchOracle.com)
foreign key  (SearchOracle.com)
Oracle  (SearchOracle.com)
row  (SearchOracle.com)

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



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

HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2003 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts