DevPinoy.org
A Filipino Developers Community
   
The SPFILE and PFILE in Oracle 10g

Somebody from LinkedIN was asking about the difference between SPFILE and PFILE in Oracle 10g. The following is a bit of explanation about the two initialization files.

The default initialization parameter file used by Oracle 10g is the SPFILE. The SPFILE (also known as the "Server Binary Parameter File" or simply "Binary Parameter File") is the binary form of your parameter file. The SPFILE, being a binary file, cannot be edited. If you need to do any changes on your initialization parameters for any reasons, you can only do the changes on your PFILE, which is the text form of your parameter file. Please do remember that you must explicitly declare use of the PFILE. You can do that by the command:

[Suppose your database is called MarlonDB]

STARTUP PFILE=’C:\oracle\product\10.2.0\admin\MarlonDB\initMarlonDB01.ora’

If you use your SPFILE to initialize the database, your command is simply:

STARTUP

Take note that if your database has no existing SPFILE and you did not explicitly declare use of a PFILE, you will get an error. To create a SPFILE from your PFILE, use this command:

CREATE SPFILE=’C:\oracle\product\10.2.0\db_1\database\spfileMarlonDB01.ora’ FROM PFILE=’C:\oracle\product\10.2.0\admin\MarlonDB\initMarlonDB01.ora’;

Similarly, you can create your PFILE from the SPFILE with this command:

CREATE PFILE=’C:\oracle\product\10.2.0\admin\MarlonDB\initMarlonDB01.ora’ FROM SPFILE=’C:\oracle\product\10.2.0\db_1\database\spfileMarlonDB01.ora’;

In summary, PFILE is the text form of the initialization parameter file. You can edit the PFILE and you must explicitly declare use of the PFILE when you are starting up the database with it. The SPFILE, on the other hand, cannot be edited. You do not need to explicitly declare use of it on startup because this is the default initialization file used by Oracle 10g.

 

[author's note: same article is also published in my other blog, http://dbalink.wordpress.com. -Marlon Ribunal 


Posted 02-03-2008 2:49 AM by marl

Comments

TrackBack wrote http://google.com/search?hl=en&client=firefox-a&rls=org.mozilla:en-us:official&hs=tww&sa=x&oi=spell&resnum=0&ct=result&cd=1&q=oracle+10g+spfile&spell=1
on 02-11-2008 1:33 PM
TrackBack wrote http://google.com/search?hl=sv&q=start+database+with+spfile+oracle+10g&lr=
on 02-11-2008 1:33 PM
TrackBack wrote http://google.gr/search?hl=el&q=oracle+για+αρχάριους&btng=αναζήτηση+google&meta=
on 02-11-2008 1:33 PM
TrackBack wrote http://google.com.sg/search?hl=en&q=create+sp+file+from+pfile&meta=
on 02-11-2008 1:33 PM
TrackBack wrote http://google.com/search?hl=en&q=pfile+spfile+oracle+server
on 02-11-2008 1:33 PM
TrackBack wrote http://google.com/search?hl=en&rls=com.microsoft:*&q=oracle+10g+pfile+parameter
on 02-11-2008 1:34 PM
TrackBack wrote http://google.co.uk/search?hl=en&q=create+pfile+from+spfile+10g&meta=
on 02-11-2008 1:34 PM
TrackBack wrote http://google.ae/search?hl=ar&q=start+oracle+database+by+used+pfile&meta=
on 02-11-2008 1:34 PM
TrackBack wrote http://google.co.in/search?hl=en&q=spfile+in+oracle++10g&btng=google+search&meta=
on 02-11-2008 1:34 PM
TrackBack wrote http://google.com/search?hl=en&rlz=1b2gggl_ende205de205&q=10.2+spfile&btng=search
on 02-11-2008 1:34 PM
TrackBack wrote http://google.com/search?hl=en&q=spfile,+oracle+10g
on 02-11-2008 1:34 PM
TrackBack wrote http://devpinoy.org/login.aspx?returnurl=/blogs/marl/archive/2008/02/03/the-spfile-and-pfile-in-oracle-10g.aspx
on 02-11-2008 1:34 PM
TrackBack wrote http://google.co.uk/search?hl=en&q=oracle+10g+default+location+for+pfile&meta=
on 02-11-2008 1:34 PM
TrackBack wrote http://google.gr/search?q=startup+spfile+10.2&ie=utf-8&oe=utf-8&aq=t&rls=swiftfox:en-us:unofficial&client=firefox-a
on 02-11-2008 1:34 PM
TrackBack wrote http://google.com.np/search?hl=ne&client=firefox-a&rls=org.mozilla:en-us:official&q=startup+pfile+command+++oracle&btng=खोजी
on 02-11-2008 1:34 PM
TrackBack wrote http://google.co.in/search?hl=en&sa=x&oi=spell&resnum=0&ct=result&cd=1&q=difference+between+pfile+and+spfile&spell=1
on 02-11-2008 1:34 PM
TrackBack wrote http://google.com/search?hl=en&q=difference+between+spfile+and+pfile+in+oracle+10g
on 02-11-2008 1:34 PM
TrackBack wrote http://google.com/search?hl=en&q=create+spfile+from+pfile+command
on 02-11-2008 1:35 PM
TrackBack wrote http://google.com/search?hl=en&sa=x&oi=spell&resnum=0&ct=result&cd=1&q=backup+spfile+oracle+10g&spell=1
on 02-11-2008 1:35 PM
TrackBack wrote http://google.com/search?hl=en&q=10g+edit+pfile
on 02-11-2008 1:35 PM
TrackBack wrote http://google.com/search?hl=en&q=creating+a+pfile+from+spfile+in+10g
on 02-11-2008 1:35 PM
TrackBack wrote http://google.com/search?hl=en&rlz=1b2gggl_ende205de205&q=10.2+spfile&btng=search
on 02-11-2008 1:35 PM
TrackBack wrote http://google.co.in/search?hl=en&q=spfile+in+oracle++10g&btng=google+search&meta=
on 02-11-2008 1:35 PM
TrackBack wrote http://google.com/search?q=oracle+10+required+parameters&hl=en&start=30&sa=n
on 02-11-2008 1:35 PM
Joe Mellon wrote re: The SPFILE and PFILE in Oracle 10g
on 05-14-2008 5:56 AM

coming back to oracle after some years with mySql... what an amateurish mess!

I think the developers have lost the plot years ago... Oracle seem to have 3000 developers who don't talk to each other who throw bits and pieces together in an uncoordinated way.

To simply find the configuration files is an adventure, never mind changing them safely.

There are 4 ways to do replication and none of them are properly documented. So you need an Oracle expert that you (a) can't find (b) who costs a fortune if you could.

Oracle is supposed to be so "powerful" qnd "flexible": well assembler is "powerful" qnd "flexible" and you might be better off implementing your own database in assembler: at least it is well documented.

A lot of the "power" and "flexibility" is there to cope with the hardware limitations of 15 years ago. It now worth nothing and confuses the hell out of everyone but oracle can't get rid of it as they no longer understand their product.

I even saw a comment by Burleson "I think this feature does...". Jeez if da man has lost the plot what hope for the rest of us?

Copyright DevPinoy 2005-2008