Modify the SPFILE Value
Log on to the Oracle server and use related commands to modify the corresponding values.
Alter system set parameter = value <comment = 'text'> <deferred> <scope = memory | spfile | both> <sid = 'sid | * '>
Sid = 'sid | *'
The default value is *, indicating all instances. Generally, the next Instance corresponds to a Database. If it is RAC (one Database corresponds to multiple instances), you must specify different SID.
<Scope = memory | spfile | both>
Memory: only modify memory Parameters
Spfile: only change files on the disk
Both: both are modified. If this parameter is not specified, both is applied by default.
<Deferred> some parameters are not currently modified and will be modified at next startup.
<Comment = 'text'> comment
Example:
Take the value of fast_start_mttr_target as an example:
First, check the default value of the fast_start_mttr_target parameter.
Show parameter fast_start_mttr_target;
Name type value
Fast_start_mttr_target integer 300
Modify:
Alter system set fast_start_mttr_target = 250;
System altered;
View the modified value (memory)
Show parameter fast_start_mttr_target;
Name type value
Fast_start_mttr_target integer 250
View spfile values
Exit sqlplus
Go to the $ ORACLE_HOEM/dbs directory
Strings spfileSID. ora
*. Fast_start_mttr_target = 250
------------------------------------
We only modify the value in the memory.
Alter system set fast_start_mttr_target = 260 scope = memory;
System altered;
View the modified value (memory)
Show parameter fast_start_mttr_target;
Name type value
Fast_start_mttr_target integer 260
View spfile values
Strings spfileSID. ora
*. Fast_start_mttr_target = 250
The modification of spfile is similar to that of memory. You only need to replace the value of scope with that of spfile.
========================================================== ==========
The comment value is stored in the updata_comment column of V $ parameter.
Alter system set fast_start_mttr_target = 260 comment = 'Hello word ';
View comment values
Select name, value, updata_comment from v $ parameter where name = fast_start_mttr_target '';
Name value UPDATA_COMMENT
Fast_start_mttr_target 260 hello word
View comment in spfile
*. Fast_start_mttr_target = 260 # hello word
========================================================== ==========
View which parameters need to be set deferred
Select name, issys_modifiable from V $ parameter where issys_modifiable = 'referred'
========================================================== ==========
If you want to apply the value that comes with the system, use the alter system reset command.
Alter system reset PARAMETER_NAME scopt = memory | spfile | both SID = 'sid | *';