First, specify the parameter file when the database is started.
In the process of starting a database, you must provide an accurate initialization parameter file, whether it is a text parameter file or a server parameter file. When you start a database by using the startup command, you can specify the server parameter file that it takes. However, there is a need to pay attention to a detail, that is, the use of initialization parameter files, the use of the keyword is different. If you are using a server parameter file, you need to specify using SPFile, or if you are using a text parameter file, you need to use the Pfile keyword. The database system does not automatically judge according to the category of the parameter file, but according to the keyword. If the confusedly phenomenon occurs, even if the initialization parameter file itself is not problematic, the database startup process is misled by incorrect use of the keyword, which can lead to database startup errors.
Considerations for Oracle Database initialization parameter changes
If the initialization parameter file is not specified in the process of starting the database with the command startup, such as when the database automatically starts with the operating system, the database system is automatically found in the default location. Typically, first looks for a server parameter file (binary), and if so, it is enabled. If not, you will continue to find out if there are any text parameter files. If it is responsible for enabling, if not, the user is prompted to fail. Therefore, the server parameter file is preferred by default. If a database administrator wants a text parameter file when the database is automatically started, you need to delete the server parameter file after shutting down the database, or move it to another location. The text parameter file is then automatically used at the next reboot without specifying the initialization parameter file. For the database system, the use of the server parameter file or text parameter file, there is no much difference. Just make sure their content is accurate. So in the end is the use of the parameters of the file as well, it depends on the database administrator's work preferences.
Second, the server parameter file maintenance.
Although you can also use a text editor to open binary form of the server parameter file, and view the relevant content. However, it should be noted that you must not change this here. That is, it is not enough to manually change this server parameter file. Because binary files are stored differently from text files. If you make a direct change here, the initialization parameter file will be corrupted, causing the database to not start properly. To do this, if you want to change the server parameter file, it is best to convert it to a text parameter file and make changes. Start or convert to server parameter files and then start the database system by using the text parameter file directly after the change is complete.
Implementing control file Multiplexing in Oracle
The other is to make changes directly through the command. It should be noted that the initialization parameters stored in the server parameter file are persisted. That is, any changes made to the parameters by command during the running of the database are saved in the server's initialization file after the database is closed. This database administrator does not have to worry about the loss of parameters after the database restarts.
Third, export the server parameter file.
The administrator needs to back up the parameter files after the database deployment is completed or before the initialization parameter file is modified. This backup is unavoidable, whether it is a server parameter file or a text parameter file. Because no database administrator can guarantee that the parameter file will be corrupted in the future. For a rainy day, the server parameter file or text parameter file backup is an important step to improve the security of the database. Second, it is sometimes necessary to export this database server parameter file when troubleshooting database failures. Because this file is exported, you can use a text editor to easily query all initialization parameters to analyze the cause of the failure. Although these initialization parameters can be viewed in tools such as database Sql*plus, it is not easy to operate. So many administrators like to guide them into a text file for analysis. Finally, make a change to the server parameter file. Because it is not possible to make changes directly to the binary server parameter file through a text editor, the database administrator will often export the server parameter file and then convert it to a text file using the commands provided by the database. Finally, convert it to a server parameter file and use it to start. Occasionally, the administrator will also lead the server parameter file before redeploying the database to facilitate subsequent reuse of the server parameter file to start the database.
When exporting database server parameter files, it is important to note the following points.
First, you need to have the relevant permissions. According to Oracle database requirements, if you want to export database server parameter files, you must need the database Sysdba or Sysoper permissions. If the user does not have similar permissions, the "Insufficient permissions" error message appears during the export of the server parameter file using the command. Second, you can directly use the command create Pfile from SPFile command to export the server parameter file as a text file. When exporting, you do not need to close the original routines. If you do not specify a directory and a name, the database is stored in a different directory. This is the main need to pay attention to this name. Because of the different operating system platform, its use of the name is different. That is, the database takes a platform-specific name without specifying the name of the exported file, and is created on platform-specific default server parameter files. Sometimes for convenience, you can specify a stored path in the command. If you want to specify a path, you need to take an = number and single quotes. such as the use of pfile= ' pathname ' form.
Third, in the process of exporting, the server also exports some of the line comments from the original binaries to a text file to facilitate the administrator to skim. Similarly, when you convert a text file to a binary server parameter file, the row annotations are stored in the binary file. However, it saves only row comments, not other annotations. When you convert a binary server parameter file to a text parameter file, the original other annotations are lost, and only the row comments are saved. Therefore, it is best to use line annotations when writing comments in the initialization parameter file. Only this line comment is persisted in the conversion process.
Create a server parameter file.
When the server parameter file is corrupted and the data cannot be started, it is possible to re-create the server parameter file. The above author has already emphasized several times, the server parameter file cannot be edited and created manually. To do this, you must create a server parameter file from a text parameter file. In order to have a remedy when a server parameter file is corrupted, it is a good idea to back up the server parameter file or export it as a text parameter file at normal times. Then, when necessary, create the server parameter file according to the text parameter file. Although you can create a text parameter file manually, the work is too complex to be easily accomplished. If you make small changes to it, but to create it from scratch, but a vast project, is basically an impossible task.
To convert to a server parameter file based on a text parameter file, you can use the commands provided by the database: Create spfile= ' from pfile= ' to complete. If you do not specify the name and path of the server parameter file, the database xiotng takes a platform-specific name and is saved in the default location of the database. The database administrator can then use the startup command to start. When saved in the default location, this server parameter file can be enabled without arguments. Because by default, this server parameter file has a higher priority than the text parameter file.
The last point to note is that even if the text parameter file, the database administrator to read the contents of this file, still need a certain degree of knowledge. To this end, I suggest that the administrator, if you change the system's default parameters, it is best to add comments to facilitate the readability of this text parameter file. In this case, using this file to troubleshoot and improve database performance makes it a little easier to improve the readability of this text parameter file.