oracle之参数文件探究(二)

2014-11-24 16:16:02 · 作者: · 浏览: 1
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.
eg:
SYS@orcl#select name,value from v$parameter where name='control_files';
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
SYS@orcl#select name,value from v$parameter2 where name='control_files';
NAME VALUE
-------------------- ------------------------------
control_files /opt/oracle/oradata/ORCL/contr
olfile/o1_mf_7q9c8orh_.ctl
control_files /opt/oracle/flash_recovery_are
a/ORCL/controlfile/o1_mf_7q9c8
pcf_.ctl
SYS@orcl#
v$system_parameter2
该试图和v$system_parameter 的区别,与v$parameter和v$parameter2却别类似。
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.
理解了关于这几个试图的区别,那么我们在看一下,当我们查看参数文件中的摸一个参数的时候使用show parameter parameter_name命令,那么该命令查看了哪个试图呢?
eg:
SYS@orcl#alter session set sql_trace=true;
会话已更改。
SYS@orcl#show parameter processes;
NAME TYPE VALUE
------------------------------------ ------------------------------ ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
global_txn_processes integer 1
job_queue_processes integer 1000
log_archive_max_processes integer 4
processes integer 160
SYS@orcl#alter session set sql_trace=false;
会话已更改。
查看trace文件如下:
*** 2013-06-15 15:45:26.626
*** SESSION ID:(181.5) 2013-06-15 15:45:26.626
*** SERVICE NAME:(SYS$USERS) 2013-06-15 15:45:26.626
*** MODULE NAME:( Oracle Enterprise Manager.pin EM plsql) 2013-06-15 15:45:26.626
*** ACTION NAME:(start) 2013-06-15 15:45:26.626
PARSING IN CURSOR #19 len=32 dep=0 uid=0 oct=42 lid=0 tim=1371282326625892 hv=0 ad='2b1f0eaafc08' sqlid='0000000000000'
alter session set sql_trace=true
END OF STMT
EXEC #19:c=4001,e=312,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=1371282326625880
*** 2013-06-15 15:45:35.418
=====================
PARSING IN CURSOR #16 len=289 dep=0 uid=0 oct=3 lid=0 tim=1371282335418064 hv=2462394820 ad='87d968b8' sqlid='7cfz5wy9caaf4'
SELECT NAME NAME_COL_PLUS_SHOW_PARAM,DECODE(TYPE,1,'boolean',2,'string