Oracle Server Parameter Files

dawn009發表於2015-04-03

A server parameter file is a repository for initialization parameters that is managed by Oracle Database. A server parameter file has the following key characteristics:

  • Only one server parameter file exists for a database. This file must reside on the database host.

  • The server parameter file is written to and read by only by Oracle Database, not by client applications.

  • The server parameter file is binary and cannot be modified by a text editor.

  • Initialization parameters stored in the server parameter file are persistent. Any changes made to the parameters while a database instance is running can persist across instance shutdown and startup.

A server parameter file eliminates the need to maintain multiple text initialization parameter files for client applications. A server parameter file is initially built from a text initialization parameter file using the CREATE SPFILE statement. It can also be created directly by the Database Configuration Assistant.

See Also:

  • to learn more about server parameter files

  • to learn about CREATE SPFILE

Text Initialization Parameter Files

A text initialization parameter file is a text file that contains a list of initialization parameters. This type of parameter file, which is a legacy implementation of the parameter file, has the following key characteristics:

  • When starting up or shutting down a database, the text initialization parameter file must reside on the same host as the client application that connects to the database.

  • A text initialization parameter file is text-based, not binary.

  • Oracle Database can read but not write to the text initialization parameter file. To change the parameter values you must manually alter the file with a text editor.

  • Changes to initialization parameter values by ALTER SYSTEM are only in effect for the current instance. You must manually update the text initialization parameter file and restart the instance for the changes to be known.

The text initialization parameter file contains a series of key=value pairs, one per line. For example, a portion of an initialization parameter file could look as follows:

db_name=sample
control_files=/disk1/oradata/sample_cf.dbf
db_block_size=8192
open_cursors=52
undo_management=auto
shared_pool_size=280M
pga_aggregate_target=29M
.
.
.

To illustrate the manageability problems that text parameter files can create, assume that you use computers clienta and clientb and must be able to start the database with SQL*Plus on either computer. In this case, two separate text initialization parameter files must exist, one on each computer, as shown in . A server parameter file solves the problem of the proliferation of parameter files.

Figure 13-7 Multiple Initialization Parameter Files

  
Description of "Figure 13-7 Multiple Initialization Parameter Files"

See Also:

  • to learn more about text initialization parameter files

  • to learn about CREATE PFILE

Modification of Initialization Parameter Values

You can adjust initialization parameters to modify the behavior of a database. The classification of parameters as static or dynamic determines how they can be modified. summarizes the differences.

Table 13-3 Static and Dynamic Initialization Parameters

Characteristic Static Dynamic

Requires modification of the parameter file (text or server)

Yes

No

Requires database instance restart before setting takes affect

Yes

No

Described as "Modifiable" in initialization parameter entry

No

Yes

Modifiable only for the database or instance

Yes

No


Static parameters include DB_BLOCK_SIZE, DB_NAME, and COMPATIBLE. Dynamic parameters are grouped into session-level parameters, which affect only the current user session, and system-level parameters, which affect the database and all sessions. For example, MEMORY_TARGET is a system-level parameter, while NLS_DATE_FORMAT is a session-level parameter (see ).

The scope of a parameter change depends on when the change takes effect. When an instance has been started with a server parameter file, you can use the ALTER SYSTEM SET statement to change values for system-level parameters as follows:

  • SCOPE=MEMORY

    Changes apply to the database instance only. The change will not persist if the database is shut down and restarted.

  • SCOPE=SPFILE

    Changes are written to the server parameter file but do not affect the current instance. Thus, the changes do not take effect until the instance is restarted.

    Note:

    You must specify SPFILE when changing the value of a parameter described as not modifiable in .
  • SCOPE=BOTH

    Changes are written both to memory and to the server parameter file. This is the default scope when the database is using a server parameter file.

The database prints the new value and the old value of an initialization parameter to the alert log. As a preventative measure, the database validates changes of basic parameter to prevent illegal values from being written to the server parameter file.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29119536/viewspace-1485604/,如需轉載,請註明出處,否則將追究法律責任。

相關文章