Wednesday, September 16, 2009

How to Change Static parameters in SPFILE and PFILE

Change Static parameters in SPFILE:
Changing static parameters requires the SPFILE option for the SCOPE clause with ALTER SYSTEM Statement and changes applies to SPFILE only. The changes cannot be applied to active Instance and the database needs to be restarted to take effect the modified parameters.

You can identify the static parameters using below query
SQL> select name, value, issys_modifiable from v$parameter
where name='processes';
NAME                     VALUE          ISSYS_MODIFIABLE
------------------- -------------- ---------------------------
Processes               150                 FALSE

All parameter that have the column ISSYS_MODIFIABLE value FALSE in the V$PARAMETER view are STATIC parameters and remaining are DYNAMIC parameters in Oracle database.

The ALTER SYSTEM command with SCOPE=SPFILE the will not update the value in the V$PARAMETER view but it will show the new value in the V$SPPARAMETER view as Oracle SPFILE parameter is updated.

For ex:-
SQL> alter system set processes=200 scope=both;
alter system set processes=200 scope=both
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified

Above statement failed because “processes” is Static parameter and can be used with SCOPE=SPFILE only.

SQL> alter system set processes=200 scope=spfile;
System altered.

You can view the new value in V$SPPARAMETER view as the SPFILE is updated.

SQL> select name, value, isspecified from v$spparameter
where name ='processes';
NAME                     VALUE         ISSYS_MODIFIABLE
------------------- -------------- ---------------------------
Processes               150                 TRUE

Changing Static parameters in PFILE:
Edit the “$ORACLE_HOME/dbs/init.ora” file with new value and bounce the database to take effect the modified parameters.

Identify weather using PFILE or SPFILE:
To check SPFILE or PFILE used by Database or instance, run below commands.

You can see the Oracle SPFILE location.

SQL > show parameter spfile;
NAME                    TYPE        VALUE
------------------ ----------- -----------------------------------------
spfile                     string          /oracle/v10201/dbs/spfileOradb.ora

SQL > select name, value from v$parameter where name = 'spfile';
NAME          VALUE
------------ ------------------------------------------------------------
spfile             /oracle/v10201/dbs/spfileOradb.ora

SQL> select count(1) from v$spparameter where isspecified = 'TRUE';

Returns a NON-ZERO value if SPFILE is in use.

Satishbabu Gunukula


  1. A PFILE is a static, client-side text file that must be updated with a standard text editor like "notepad" or "vi". This file normally reside on the server, however, you need a local copy if you want to start Oracle from a remote machine. DBA's commonly refer to this file as the INIT.ORA file. An SPFILE is a persistent server-side binary file that can only be modified with the "ALTER SYSTEM SET" command. This means you no longer need a local copy of the pfile to start the database from a remote machine. Editing an SPFILE will corrupt it, and you will not be able to start your database anymore.

    2gb micro sd karte

  2. Very nice article. I learned some knowledgeable information. Thanks for sharing.

    html training in chennai

  3. We Develop app for your company or build website for your company and much more.....

    Applications For Android

  4. Well, even after changing the process to 200, the query gave the output as 150 where you mentioned it to be having the new value. Because the database needs to be restarted.

  5. شركة نقل عفش | شركة نقل اثاث بجدة | شركة نقل عفش بالرياض | شركة نقل عفش بالمدينة المنورة | شركة نقل عفش بالدمام شركة نقل عفش بجدة شركة نقل عفش بالمدينة المنورة

  6. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site. digital marketing training in chennai. data science training in bangalore.

  7. Nice blog has been shared by you. it will be really helpful to many peoples who are all working under the technology.thank you for sharing this blog.
    big data training in chennai|

  8. Its a very useful article and excellent information. Thanks for sharing such a nice article. Top cloud solution Services company| Austere Technologies

  9. This comment has been removed by the author.

  10. Very interesting article with good informative content, thanks for sharing. ORACLE CLOUD SERVICES FOR APPLICATION DEVELOPMENT | MASSIL TECHNOLOGIES

  11. Very good informative blog. Thanks for sharing such nice article.
    Best IT Security Services | Austere Technologies

  12. Nice blog has been shared by you. it will be really helpful to many peoples who are all working under the technology.

    Weblogic Administration Training

  13. Your new valuable key points imply much a person like me and extremely more to my office workers. With thanks; from every one of us. Digital Marketing Training in chennai