Pfile,spfile initialization parameter file order "Weber"

Source: Internet
Author: User

First, initialize the parameter file

The initialization parameter file is read when the instance is launched. There are two types of parameter files:

1 , server parameter file: This is the initialization parameter file of the preferred type. This is a binary file written or read by the database server and must not be edited manually. This file resides on the server that executes the Oracle database and is always present, unaffected by database shutdown or startup. This file is often referred to as a server parameter file (SPFILE). The file is named Spfile<sid>.ora by default and is automatically searched for when it starts.

2. text initialization parameter file: This type of initialization parameter file can be read by the database server, but cannot be written by it. You must use a text editor to manually set and change initialization parameter settings, which are permanent and are not affected by database shutdown or startup. The file is named Init<sid>.ora by default and is automatically searched if SPFILE is not found at startup.

switching of two or two parameter files

  The default database is to use SPFile.

From SPFile--->pfile:

sql> Create pfile='/u01/pfile.ora' from spfile; File created.

From Pfile to SPFile:

 from pfile='/u01/pfile.ora'; File created.

Start with the startup Pfile method

[[Email protected] dbs]$ startup pfile= ' U01/pfile.ora ';

ORACLE instance started.

Total System Global area 285212672 bytes

Fixed Size 1218992 bytes

Variable Size 79693392 bytes

Database buffers 201326592 bytes

Redo buffers 2973696 bytes

Database mounted.

Database opened.

Third, initialize the parameters of the file order

We know that the parameter file has an SGA size setting, which we take as an example:

sql> shutdown immediate;

Move the spfile of the database away.

[[Email protected]Oracle dbs]$ MV Spfile.ora spfile.ora.bak[[email protected]-oracle dbs]$ LS hc_orcl.dat< C2/>initdw.ora  init.ora  lkorcl  orapworcl  spfile.ora.bak

Start the database try it: you will send

Sql>Startup Nomount;ora-01078: FailureinchProcessing System PARAMETERSLRM-00109: Could not open parameter file'/u01/oracle/db_1/dbs/initorcl.ora'SQL>Startup Nomount;oracle instance started. Total System Global Area281018368bytesfixed Size2020192bytesvariable Size100666528Bytesdatabase Buffers176160768Bytesredo Buffers2170880Bytessql>Show parameter Sganame TYPE VALUE------------------------------------ ----------- ------------------------------Lock_sga Boolean Falsepre_page_sga boolean Falsesga_max_si Ze big integer 268msga_target big integer 268M

The value of LOCK_SGA is false, which is obviously not used by the parameter file.

Let's take another look at the other parameters:

sql> show parameter controlfile; SQL> show parameter controlname                                 TYPE        VALUE---------------------------------------------- -------------------------------control_file_record_keep_time        integer     7Control_ Files                        string      /u01/oracle/oradata/orcl/contr                                                 /u01/oracle/oradata/                                                  ORCL/control02.ctl,/u01/oracl                                                 e/oradata/orcl/control03.ctl

You can view the parameter values and be able to modify the parameters if the dynamic modification must be spfile start the database.

Select  from v$instance;  STATUS------------STARTED

Let's move the SPFile back.

Then give the database to:

ALTER DATABASE mount ALTER DATABASE open;

The database load process involves performing the following tasks:

      • Associating a database with a previously launched instance
      • Locate and open the control file specified in the parameter file
      • Gets the name and status of the data file and the online redo log file by reading the control file. However, you can verify that a data file and an online redo log file are present without performing a check at this time

Pfile,spfile initialization parameter file order "Weber"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.