Recovering an Oracle database after doing something bad to your SPFILE

Well it has been over a year since the last time I broke my database, but I did it again today!  This time I increased the sga size without also increasing some other parameter, and the database would not start, and since it would not start, I could not change the parameter.  What to do?

After a bit of hacking the SPFILE to no avail, I worked out the following process:

First, log on to Oracle as an administrator:

sqlplus / as sysdba

Next, create a nice editable plain text PFILE from the “binary” SPFILE:

create pfile from spfile;
exit

Now you can edit PFILE to change whatever parameters you need to.  Once you are done, you can start up the database from the PFILE:

sqlplus /  as sysdba
startup pfile=initSID.ora

Problem solved!

About Mark Nelson

Mark Nelson is a Developer Evangelist at Oracle, focusing on microservices and AI. Mark has served as a Section Leader in Stanford's Code in Place program that has introduced tens of thousands of people to the joy of programming, he is a published author, a reviewer and contributor, a content creator and a lifelong learner. He enjoys traveling, meeting people and learning about foods and cultures of the world. Mark has worked at Oracle since 2006 and before that at IBM since 1994.
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a comment