[Oracle] Two Methods for initializing parameter files: spfile, pfile, and modifying parameters

Source: Internet
Author: User
During the startup process, the oracle database needs to read the initialization parameter file to determine a series of parameters, such as the database name pfile name and the size of the SGA

During the startup process, the oracle database needs to read the initialization parameter file to determine a series of parameters, such as the database name pfile name and the size of the SGA

During oracle Database startup, you need to read the initialization parameter file to determine a series of parameters, such as the database name pfile name, SGA size, and maximum number of connections. pfile is such an initialization parameter file, you can directly open and edit a text file. When the database is started, find the file in the default directory, or specify the pfile file in the command line:

SQL> startup pfile = 'H: \ oracle \ product \ 10.2.0 \ db_1 \ database \ INITorcl. ORA

The default name of the pflie file is init. . Ora

However, since Oracle9i, spfile is introduced, and s represents the server. It is a server-side binary file and cannot be opened or modified directly. Oracle preferred spfile The. ora file is used as the startup parameter file. If the file does not exist, select spfile. ora. If neither of the preceding two exists, select init. . Ora file. If none of the above three files exist, the instance cannot be started. Of course, specifying the pfile startup method is still valid for the new version.

Spflie cannot directly open the modification. How can I modify it? There are two methods:

1. SQL> alter system set xx = ×× scope = spfile/both -- it means to modify the parameters and write the modifications to the spfile, if the scope value is both, the modification takes effect after both modifying the parameters of the current instance and writing the modification to the spflie instance. Note that if it is a static parameter, only the spfile option can be used, static Parameters are parameters that cannot be changed in the current instance. They can only take effect after the instance is restarted by writing the changes to the spfile. Note that if the scope option is omitted, the default value is both and spfile is used to start the instance. If pfile is used to start the instance, the default value is memory, that is to say, the changes are not saved to the parameter file and are only valid for the current instance, refer to the self-http://www.itpub.net/thread-1099216-1-1.html 7th-floor.

2. Use pfile and spflie to generate and modify spfile.

① Generate pfile from spfile: SQL> create pfile from spfile; -- as long as spfile exists in the default directory, it can be executed at any stage of the database (including shutdown, nomount, mount, and open ). After the command is executed, the init is generated in the default directory. . Ora file, which is called pfile. In windows, the default oracle10g directory is ORACLE_HOME \ database.

② Modify parameters in the pfile file. If it cannot be opened, you can copy it to the desktop and replace it with another one.

③ Use the modified pfile to generate the spfile: SQL> create spfile from pfile; -- note that this step can only be executed when the instance is closed.

In the mutual generation of pfile and spfile, you can specify a file without using the default file, for example:

SQL> create spfile from pfile = 'H: \ oracle \ product \ 10.2.0 \ your_pfile ';

-- EOF --

Related Article

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.