Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the two ways for oracle to initialize parameter files spfile and pfile and to modify parameters

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the oracle initialization parameter file spfile, pfile and the two ways to modify the parameters are, the content is very detailed, interested friends can refer to, hope to be helpful to you.

During startup, the oracle database needs to read the initialization parameter file to determine a series of parameters, such as database name pfile name, SGA size, maximum number of connections, and so on. Pfile is such an initialization parameter file, and the text file can be opened and edited directly. When the database starts, look for this file in the default directory, or specify the pfile file on the command line:

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

The default naming method for pflie files is init.ora

But starting with Oracle9i, spfile is introduced, and s stands for server, which is a server-side binary that cannot be opened and modified directly. Oracle prefers the spfile.ora file as the startup parameter file; if the file does not exist, select spfile.ora;; select the init.ora file if the first two files do not exist; if none of the above three files exist, the instance cannot be started. Of course, directly specifying the startup mode of pfile is still valid for the new version.

Spflie cannot be opened directly for modification, so how to modify it? There are two ways:

1. SQL > alter system set xx= × × scope=spfile/both-means to modify the parameters and write the changes into spfile. If the value of scope is both, the parameters of the current instance will be modified and the changes will take effect after the instance is restarted by spflie. Note that if it is a static parameter, you can only use the spfile option. Static parameters refer to parameters that cannot be changed in the current instance. This parameter can only take effect after the instance is restarted by writing changes to spfile. One problem to note is that when the scope option is omitted, the default is both, and when starting the instance using spfile; if you start the instance with pfile, the default is memory, that is, the changes will not be saved to the parameter file, and are only valid for the current instance, as referenced from http://www.itpub.net/thread-1099216-1-1.html 7th-floor.

two。 Modify the spfile through the mutual generation of pfile and spflie.

① first generates spfile into pfile: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 execution, the init.ora file is generated under the default directory, that is, the default directory for oracle10g under the pfile,windows is ORACLE_HOME\ database.

② modifies the parameters in the pfile file. If it cannot be opened, you can copy it to the desktop and change it back.

③ generates the spfile file with the modified pfile file: SQL > create spfile from pfile;-- note that this step can only be performed during the instance shutdown phase.

In addition, in the mutual generation of pfile and spfile, you can specify a file without using the default file, such as:

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

On the oracle initialization parameter file spfile, pfile and modify the parameters of the two ways are shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report