When it comes to oracle parameter files, this is a very important file. When the database starts the instance, it initializes the memory, database name, and other environments. Only the parameter files are available.
When it comes to oracle parameter files, this is a very important file. When the database starts the instance, it initializes the memory, database name, and other environments. Only the parameter files are available.
Many friends who have just started learning the database often asked me questions about parameter file backup and recovery and the failure to start the instance due to misoperations. I am also a man who wrote this log today, I hope to help you and learn from each other and make progress. Record it here.
Speaking of the Oracle parameter file, this is a very important file. During the instance startup process, the database initializes the memory, database name, and other environments, only when the parameter file is correctly configured can the database start the instance and mount and open it.
1) parameter View
View related to parameter files include v $ parameter, v $ spparameter, v $ system_parameter, v $ parameter2, v $ system_parameter2.
V $ parameter
The v $ parameter view displays information about the initialization parameters that take effect in the current session. Each new session inherits some parameters from the v $ system_parameter view. It can be seen that v $ parameter is based on the current session, while v $ system_parameter is instance-based. It is similar to the profile Environment Parameter of linux.
V $ PARAMETER displays information about the initialization parameters that are currently in effect for the session. A new session inherits parameter values from the instance-wide values displayed by the V $ SYSTEM_PARAMETER view.
V $ spparameter
This parameter records the parameter settings in the parameter file (spfile). If the parameter file is not used, each value in this parameter is false in the ISSPECIFIED column.
V $ SPPARAMETER displays information about the contents of the server parameter file. if a server parameter file was not used to start the instance, then each row of the view will contain FALSE in the ISSPECIFIED column.
Eg:
SYS @ orcl # select sid, name, type, value, isspecified, ordinal from v $ spparameter where rownum <3;
SI NAME TYPE VALUE ISSPECIFIED ORDINAL
--------------------------------------------------------------------------------------------------------
* Lock_name_space string FALSE 0
* Processes integer 160 TRUE 1
SYS @ orcl # create pfile = '/opt/oracle/pfile. ora' from spfile;
The file has been created.
SYS @ orcl # shutdown immediate
The database has been closed.
The database has been detached.
The ORACLE routine has been disabled.
SYS @ orcl # startup pfile = '/opt/oracle/pfile. ora ';
The ORACLE routine has been started.
Total System Global Area 805875712 bytes
Fixed Size 2148720 bytes
Variable Size 511706768 bytes
Database Buffers 285212672 bytes
Redo Buffers 6807552 bytes
The database has been loaded.
The database has been opened.
SYS @ orcl # select sid, name, type, value, isspecified, ordinal from v $ spparameter where rownum <3;
SI NAME TYPE VALUE ISSPECIFIED ORDINAL
--------------------------------------------------------------------------------------------------------
* Lock_name_space string FALSE 0
* Processes integer FALSE 0
SYS @ orcl #
V $ system_parameter
For instance, other session information is based on the attempt to "copy.
V $ SYSTEM_PARAMETER displays information about the initialization parameters that are currently in effect for the instance. A new session inherits parameter values from the instance-wide values.
V $ parameter2
This parameter file is used to format multiple values in the v $ parameter.
V $ PARAMETER2 displays information about the initialization parameters that are currently in effect for the session, with each list parameter value appearing as a row in the view. A new session inherits parameter values from the instance-wide values displayed in the V $ SYSTEM_PARAMETER2 view.
Presenting the list parameter values in this format enables you to quickly determine the values for a list parameter. for example, if a parameter value is a, B, then the V $ PARAMETER view does not tell you if the parameter has two values (both a and B) or one value (, B ). V $ PARAMETER2 makes the distinction between the list parameter values clear.
Eg:
SYS @ orcl # select name, value from v $ parameter where;
NAME VALUE
--------------------------------------------------
Control_files/opt/oracle/oradata/ORCL/contr
Olfile/o1_mf_7q9c8orh _. ctl,/o
Pt/oracle/flash_recovery_area/
ORCL/controlfile/o1_mf_7q9c8pc
F _. ctl