Monday, February 27, 2006

Spfile or Pfile dilemma

Here is something which would be useful in determining what was used to start an oracle instance:
We have 5 possible answers(Clearly Spfile is the way to go in future..just in case you are still having 8i and 9i instances and switching over to spfiles):

1. On Startup the DB first looks for spfileYourSID.ora in the default location (eg On windows it would most probably be $ORACLE_HOME/database or $ORACLE_HOME/dbs on unix) and then looks for spfile.ora in the same default location.Spfile in the default location is used with the default name and no pfile was used.

This would be the case for all default 9i DBs created from 9i onwards.

2. A pfile in the default location with the default name(init.ora) was used and a nondefault spfile was used using IFILE parameter in pile pointing to the non defailt location of spfile.

Here on instance startup the db looks for default spfile and if not there goes for default pfile which in turn points to the spfile in nondefault location.

3. A nondefault pfile was used and a nondefault spfile was used.

Here you specified a non default pfile on instance startup for some reasons known to you.

4. A pfile in the default location with the default name was used and no spfile was used.

i.e It's high time you read about spfile and switch to spfile here.

5. A nondefault pfile was used and no spfile was used.

Same as above in case 4.