Sunteți pe pagina 1din 3

PARAMETER FILE

Parameters are global variables. Their values are initialized from a file during the start of the
Oracle Database. If you start a database instance using spfile with an environment
variable set, then its value is automatically stored in spfile. If you unset the environment
variable subsequently(later)and start the instance afresh, then database uses the parameter
value of Oracle base stored in spfile.

Or

When an Oracle Instance is started, the characteristics of the Instance are established by
parameters specified within the initialization parameter file. These initialization parameters
are either stored in a PFILE or SPFILE. SPFILEs are available in Oracle 9i and above. All prior
releases of Oracle are using PFILEs.

ADVANTAGES OF SPFILE OVER THE PFILE

 An SPFILE can be backed-up with RMAN (RMAN cannot backup PFILEs)


 The SPFILE is maintained by the server. Parameters are checked before changes
are accepted.

 Easy to find - stored in a central location

DIFFERENCE BETWEEN SPFILE AND PFILE

SPFILE PFILE
This is binary file can’t be edit (only This is text file can be edit .
we can edit this file “ALTER SYSTEM
SET”)
This is server centric file means found Pfile find in client side .
in server side .
Editing in spfile will corrupt id.you will
not able to start your database
without spfile .

PROPERTIES

If a server parameter file was used to start up the database, then BOTH is the
default. If a parameter file was used to start up the database, then MEMORY is the
default, as well as the only scope you can specify.

3.1.1 - MEMORY
MEMORY indicates that the change is made in memory, takes effect immediately,
and persists until the database is shut down. If you started up the database using a
parameter file (pfile), then this is the only scope you can specify.

3.1.2 - SPFILE
SPFILE indicates that the change is made in the server parameter file. The new setting
takes effect when the database is next shut down and started up again. You must
specify SPFILE when changing the value of a static parameter that is described as not
modifiable in Oracle Database Reference.

3.1.3 - BOTH
BOTH indicates that the change is made in memory and in the server parameter file.
The new setting takes effect immediately and persists after the database is shut
down and started up again.

3.1.4 - Example
ALTER system SET db_2k_cache_size=100m SCOPE=SPFILE;

ALTER system SET db_2k_cache_size=100m SCOPE=MEMORY;

ALTER system SET db_2k_cache_size=100m SCOPE=BOTH;

3.2 - Changeable
Not every parameter is changeable when the instance is running; parameters fall into
three general categories:

3.2.1 - Not changeable online


Not changeable online. The Oracle Database Reference describes initialization
parameters and their properties, among other things. The documentation includes a
“modifiable” property for each parameter, and if a parameter is not modifiable, it is
not changeable online. AUDIT_TRAIL, for example, is not modifiable (not changeable
online).

3.2.2 - Changeable online, but only for future sessions


Changeable online, but only for future sessions. The change won’t affect any
currently connected session, but it will affect all new sessions created after the ALTER
SYSTEM was executed. For example, SORT_AREA_SIZE is changeable online, but only
for future sessions:
How will I know if my database is using a PFILE or
SPFILE:

Sql> show parameter spfile

If value is there then using spfile if null using pfile .

Sql> select value from v$parameter where name ='spfile';

If value is not null using spfile else using pfile.

Viewing Parameters Settings


o V$PARAMETER view - display the currently in effect parameter values
o V$SPPARAMETER view - display the current contents of the server parameter file.

Default Location of SPfile and pfile


In Oracle9i, you can startup the instance using either an spfile or an init.ora
file.

An Oracle9i instance may be started by:

The default initialization files must are located as follows:

- on Linux ---> $ORACLE_HOME/dbs


- on Windows ---> %ORACLE_HOME%\database

S-ar putea să vă placă și