Oracle 9i SPFile

zhaozj2021-02-16  80

In 9i, Oracle can use the server parameter file (SPFILE, System Parameter file instead of the traditional init.ora parameter file. SPFile is an binary file created by Oracle in the operating system level for storing database parameters.

You can use the CREATE SPFILE command to create a spfile based on the current parameter setting of the database. You can use the ALTER SYSTEM or ALTER SESSION to dynamically modify those parameters that can be dynamically modified and these changes can take effect immediately, you can also use the ALTER System's new option Scope to come Choose to apply only to the current instance or applied to the SPFile. There are three optional values: Memory: Memory: SPFILE: SPFILE: Only the SPFILE setting (if the static parameter is modified, you must specify scope = spfile, otherwise ORA-02095 will be reported.); Both : Change the instance and spfile (using the BOTH option is actually equivalent to the Alter System statement without parameters).

When using the startup command without a PFile clause, Oracle reads the initialization parameters from the server parameter file (spfile) specified by the platform. Oracle Finding the order of init.ora is: On the default location specified by the platform, Oracle first looks for files named spfile $ oracle_sid.ora, if you don't look for the spfile.ora file, you have nothing wrong, INIT $ ORACLE_SID.ORA file.

Under $ oracle_base / admin / db_name / spfile, you are likely to see a file like this init.ora.192003215317] name, which is initializing the parameter file, just keeping up with timestamp. For Oracle920, the default is started using SPFILE, but this spfile is not shipped, but it is created according to this file, you can remove this long suffix, which is the standard pfile file.

note:

The default location directory specified for the UNIX platform for server parameter files or text initialization parameter file is:

$ Oracle_Home / DBS / SPFILE $ ORACLE_SID.ORA

For Windows NT and Windows 2000, its location is:

$ Oracle_Home / Database / SPFILE $ ORACLE_SID.ORA

SPFILE supports a multi-instance database (RAC), that is, all instances share a SPFile. You can view the value of the show parameter spfile parameter, if the value column returns a null value, then you will use the PFile; or see if the current instance is used in the current instance: SPFILE:

SQL> SELECT DECODE (count (*), 1, 'spfile', 'pfile') USED

2 from V $ SPPARETER

3 where rownum = 1 and isspecified = 'true'

4 /

Used

----------------

SPFILE

Before Oracle 9i, we can find the parameter value of the current instance by viewing V $ Parameter and V $ Parameter2, in Oracle 9i, we can also check V $ SPPARETER

Really get the parameter values ​​of all currently used SPFiles, including parameters that use the ALTER System command of the Scope = SPFile parameter. SPFILE can create from a PFILE file:

Create spfile [= 'spfile-name'] from pfile [= 'pfile-name']

Using PFile without file name In the default location, you can use create spfile from pfile; command, at this time, the system is based on the default location (UNIX: $ Oracle_Home / DBS; NT: $ Oracle_Home / Database) Pfile in the default The location is created with a file named spfile.ora. Creating SPFILE needs SYSDBA or SYSOPER permission.

We can also create a PFILE file according to the spfile file:

Create Pfile [= 'pfile-name'] from spfile [= 'spfile-name']

The Pfile file created at this time will be an editable text file.

转载请注明原文地址:https://www.9cbs.com/read-13922.html

New Post(0)