Setting or Changing Initialization Parameter
Values
Use the SET clause of the ALTER
SYSTEM statement to set or
change initialization parameter values. The optional SCOPE clause specifies the scope of a change as
described in the following table:
SCOPE
Clause
|
Description
|
SCOPE
= SPFILE
|
The
change is applied in the server parameter file only. The effect is as
follows:
This
is the only SCOPE specification allowed for
static parameters.
|
SCOPE
= MEMORY
|
The
change is applied in memory only. The effect is as follows:
For
static parameters, this specification is not allowed.
|
SCOPE
= BOTH
|
The
change is applied in both the server parameter file and memory. The effect is
as follows:
For
static parameters, this specification is not allowed.
|
It is an error to specify SCOPE=SPFILE or SCOPE=BOTH if the instance did not
start up with a server parameter file. The default is SCOPE=BOTH if a server parameter file was used to start up
the instance, and MEMORY if a text initialization
parameter file was used to start up the instance.
For dynamic parameters, you can also specify the DEFERRED keyword. When specified, the change is effective
only for future sessions.
When you specify SCOPE as SPFILE or BOTH, an optional COMMENT clause lets you
associate a text string with the parameter update. The comment is written to
the server parameter file.
The following statement changes the maximum number of failed login
attempts before the connection is dropped. It includes a comment, and
explicitly states that the change is to be made only in the server parameter
file.
ALTER SYSTEM SET SEC_MAX_FAILED_LOGIN_ATTEMPTS=3
COMMENT='Reduce from 10 for tighter security.'
SCOPE=SPFILE;
The next example sets a complex initialization parameter that
takes a list of attributes. Specifically, the parameter value being set is the LOG_ARCHIVE_DEST_n initialization parameter. This statement could
change an existing setting for this parameter or create a new archive
destination.
ALTER SYSTEM
SET LOG_ARCHIVE_DEST_4='LOCATION=/u02/oracle/rbdb1/',MANDATORY,'REOPEN=2'
COMMENT='Add new
destimation on Nov 29'
SCOPE=SPFILE;
When a value consists of a list of parameters, you cannot edit
individual attributes by the position or ordinal number. You must specify the
complete list of values each time the parameter is updated, and the new list
completely replaces the old list.
You can use the ALTER SYSTEM RESET command to clear
(remove) the setting of any initialization parameter in the SPFILE that was
used to start the instance. Neither SCOPE=MEMORY nor SCOPE=BOTH are allowed. TheSCOPE = SPFILE clause is not required, but can be included.
You may want to clear a parameter in the SPFILE so that upon the
next database startup a default value is used.
No comments:
Post a Comment