学会使用官方文档

来源:互联网 发布:linux 向组里添加用户 编辑:程序博客网 时间:2024/05/22 10:29
·       学会使用官方文档,在网站tahiti.oracle.com上查找V$session的描述信息,查出dbms_stats包的信息,并截图贴出来。
http://tahiti.oracle.com/     这是Oracle所有文档的统一入口,在这里可以找到数据库  应用服务  合并应用等所有的参考文档
我们数据库版本:Release 11.2.0.1.0
1.Oracle Database, 11g Release 2 (11.2)      所以我们应该查这个文档
2.左上角找到 Master Boot List官方文档的索引
3.如果想查看《初始化视图+数据字典+动态性能视图》请参考《Reference
4.选择Part III Dynamic Performance Views 这个部分中searchv$session,结果中排在第一行的就是v$session信息,列举了每个字段的含义,v$session相应的命令
V$SESSION displays session information for each current session.
Column
Datatype
Description
SADDR
RAW(4 | 8)
Session address
SID
NUMBER
Session identifier
SERIAL#
NUMBER
Session serial number. Used to uniquely identify a session's objects. Guarantees that session-level commands are applied to the correct session objects if the session ends and another session begins with the same session ID.
AUDSID
NUMBER
Auditing session ID
PADDR
RAW(4 | 8)
Address of the process that owns the session
USER#
NUMBER
Oracle user identifier
USERNAME
VARCHAR2(30)
Oracle username
COMMAND
NUMBER
Command in progress (last statement parsed); for a list of values, seeTable 9-2. These values also appear in the AUDIT_ACTIONS table.
OWNERID
NUMBER
Identifier of the user who owns the migratable session; the column contents are invalid if the value is 2147483644
For operations using Parallel Slaves, interpret this value as a 4-byte value. The low-order 2 bytes represent the session number and the high-order bytes represent the instance ID of the query coordinator.
TADDR
VARCHAR2(8)
Address of the transaction state object
LOCKWAIT
VARCHAR2(8)
Address of the lock the session is waiting for; NULL if none
STATUS
VARCHAR2(8)
Status of the session:




  • ACTIVE - Session currently executing SQL
  • INACTIVE - Session which is inactive and either has no configured limits or has not yet exceeded the configured limits
  • KILLED - Session marked to be killed
  • CACHED - Session temporarily cached for use by Oracle*XA
  • SNIPED - An inactive session that has exceeded some configured limits (for example, resource limits specified for the resource manager consumer group or idle_time specified in the user's profile). Such sessions will not be allowed to become active again.
dbms_stats包信息在《PL/SQL Packages and Types Reference》文档中找,也是利用书列表,在这个文档中查询如下关键字即可找到
 141  DBMS_STATS
Using DBMS_STATSThis section contains topics which relate to using the DBMS_STATS package.
·         Overview                               概述
·         Types                                    包类型
·         Constants                              常数
·         Operational Notes                   操作说明
·         Deprecated Subprograms       不用的子过程
·         Examples                                例子,这段是非常常用的部分
这是DBMS_STATS包在官方文档中的描述
EXEC DBMS_STATS.GATHER_TABLE_STATS ('hr', 'employees');   这是我们经常使用的分析表统计信息的存储过程。