Solved

Instance_inIitalizatiion_File

Posted on 2011-09-03
6
234 Views
Last Modified: 2012-05-12
What is the difference between init.ora and spfile?

How do you know if a database is using init.ora or spfile or both?
0
Comment
Question by:sam15
  • 4
  • 2
6 Comments
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
ID: 36478766
both files serve the same purpose, that is defining system parameters


init.ora is a plain text file and can only be editted externally to the database.

spfile can be changed from within the database   with a command like this...
alter database set <some parameter>=<some value>  scope=spfile


look in v$parameter  if spfile is populated then you are using an spfile
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 36478769
also,  if you try to execute an alter database command with scope=spfile  or scope=both  it will only work if you have an spfile.  If you don't you'll get an error
0
 

Author Comment

by:sam15
ID: 36480613
so let me clarify something.

A database must have an init.ora but the spfile is optional when you install oracle?

Both have same parameters and server same purpose? it is just one can be edited from O/S and the other using the SQL inside the database.

I think oracle database will read spfile first if it exists when you start the instance. If it does not exist, it will check the init.ora.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 73

Expert Comment

by:sdstuber
ID: 36480894
you must have one or the other.  you can have both but you must have at least one, it doesn't matter which though


and yes they serve the same purpose,  
correct - you don't modify an spfile with a text editor though,  use alter system for that
0
 

Author Comment

by:sam15
ID: 36481707
if you have both file is oracle really reading both on startup?

I am not sure why oracle introudcued this spfile thing in 9i/10g. king of conufusing to have 2 files that serve same purpose.
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 36481777
only one will be the "first",  but an init.ora file can include an spfile

similarly  an spfile can include an ifile


they were introduced because it's more convenient and easy to remember to set your values from within the database

rather than issuing alter system  and then editting the init.ora,   you can instead issue alter system with scope=both and update both at the same time.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now