Posted in 2016

pfile or spfile?

In my old work there were strange things on daily business. I don’t know why, but for instance a dataguard configuration was a nonstandard configuration for Oracle Support. We had only shipping configured and scripts took care of switchover/failover and the gap check. Do you know since when this concept exists? ..since 8i, well, that’s around year 2002, last year was 2015 and the “standard” is still in use. I understand that dinosaurs are incredible, but we should focus on the future.

So why should someone use an spfile, when you can use a pfile? A pfile has so much benefits.. you can write to it in every editor, so cool and that’s it, no more benefits.

With an spfile you have so much negative aspects, you cannot write to it and well that’s it.
So the strong thing on a pfile is it’s simplicity to write to it, or?
Spfile is even simpler:
1. you can write with sqlplus to it, alter system set parameter=value scope=spfile ;
and oracle checks if you can add it or not.
2. if you start an instance with an spfile, you can change dynamic parameters and save them in the spfile with “scope=both”, you don’t need to open the file in an editor and make mistakes, typos, like humans do, you know.
3. You can add comments to the parameters that can be selected, they are not so cool like the pfile hashtag comments (twitter friends like to hashtag everything)
4. The most important thing, you can make a backup of this file either to disk or tape.
Imagine, you are a cool pfile tuner, restart several times, change the pfile and suddenly a hacker removes your file and reboots the machine.. the database is lost. (OK, it’s not lost, but we can pretend it’s lost)

I don’t say, people who work with Oracle longer don’t know what they do, but there are sometimes “new” features which should be adopted. If you believe in someone skills, do not forget, he is a human, he can be wrong, like I can, but it’s better to choose from 2 possibilities than from 1, because if you choose from 1, you are like the Slovak government, you have 1 contract, you pay for an advisor let’s say 1 million (it’s on the internet, the correct number) to choose the best contract and you cheer him afterwards for doing a great job.

I dedicate this article the greatest DBA woman in Slovakia.



Database administrator who loves to work with Oracle software. (Sometimes not)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s