Change Static Parameters Through the SPFILE
Oracle9i introduced the ability to dynamically set certain instance parameters thorugh the use of an SPFILE. Although, not every parameter can be set dynamically, for example,
audit_trail. These are known as static parameters. Here is an example of what happens and the errors received when you try to change a static parameter within Oracle:
SQL> alter system set audit_trail=DB scope=both;
alter system set audit_trail=DB scope=both
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
|
The problem - You need to change a static parameter value in the SPFILE to be used at instance startup.
To apply the parameter change, SCOPE=BOTH applies the modification at the instance level and in the spfile used at startup. Use the value that applies the modification in the spfile only, provided that the spfile was used at startup:
SQL> alter system set audit_trail=DB scope=spfile;
System altered.
|
If no spfile was used at startup, you would get another error message such as:
SQL> alter system set audit_trail=DB scope=spfile;
alter system set audit_trail=DB scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup
|
According to the definition of a
static parameter, it cannot be modified during instance life, but only in the
init or
spfile parameter file.
No comments:
Post a Comment