(一)Characterset of Parameters
parameter的value必须为US7ASCII (7-bit ASCII).
Only characters from the default character set of the database platform are supported in parameter values.
For all platforms except IBM z/OS and Fujitsu BS2000 the default platform character set is US7ASCII (7-bit ASCII).
The database behavior is undefined when parameter values with unsupported characters are specified.
When using the ALTER SYSTEM statement to set a parameter value in a server parameter file, make sure only supported characters are used.
The database does not always report an error when a value with unsupported characters is specified.
pfile文件是客户端文件,不是服务端文件!它的字符集必须为NLS_LANG设置,此字符集必须是character set of the database的子集
The initialization parameter file is a client-side file. When used, it is located on the host on which you start SQL*Plus to start up a database instance.
The initialization parameter file must be written in the client character set as specified by the NLS_LANG client setting.
However, parameter values should not contain characters not supported by the default character set of the database.
(二)PARAMETER VIEWS
视图查询的参数名是小写:select * from v$parameter where name='SESSIONS'; 是查不到的
- v$spparameter为spfile中参数值
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
- v$system_parameter 为当前实例的参数值,即system级别值
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$parameter为session级别值
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$parameter2/ v$system_parameter2总体来说没啥用,与上面唯一区别:
用于区分这个参数值是完整的一个还是作为列表处理,1为完整一个,2为列表处理,通过前者的ORDINAL列:
select name,value,ORDINAL from v$parameter2 where ORDINAL=0;
select name,value,ORDINAL from v$parameter2 where ORDINAL=1;
select name,value,ORDINAL from v$parameter2 where ORDINAL=2;
1是表示整体处理,2是列表处理, control_files参数即为2
control_files=(/u01/app/oracle/oradata/orcl/control01.ctl, /u01/app/oracle/oradata/orcl/control02.ctl)
V$SYSTEM_PARAMETER2 displays information about the initialization parameters that are currently in effect for the instance, with each list parameter value appearing as a row in the view. A new session inherits parameter values from the instance-wide values.
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$SYSTEM_PARAMETER view does not tell you if the parameter has two values (both a and b) or one value (a, b). V$SYSTEM_PARAMETER2 makes the distinction between the list parameter values clear.
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 (a, b). V$PARAMETER2 makes the distinction between the list parameter values clear.