ORACLE和会话相关的视图
1. v$session和v$session_wait
v$session视图记录了当前连接Session的信息,这些信息包括用户名、连接主机、Session正在执行的SQL的SQL_ADDRESS、SQL_HASH_VALUE等,非常详尽。
v$session_wait则记录了当前连接session正在等待的资源信息。在Oracle 10g中,Oracle将v$session_wait视图的内容合并入v$session视图,使得对于当前session信息的获取更加简便。
通过这两个视图,可以快速得到当前连接session的状态,如果数据库正在经历诸如等待、竞争、锁定等问题,通过这两个视图就可以找到性能问题的原因,以及正在导致这些问题的session。
v$sysstat;
-
v$system_event;
-
v$process;
-
v$sql;
-
v$sqltext;
-
v$lock;
-
v$latch_children;
-
v$bh。
除了数据库等待、统计信息等,我还关心进程信息(v$process)、闩(v$latch_children)竞争信息、锁(v$lock)等待信息、SQL(v$sql,v$sqltext)信息、Buffer信息(v$bh),当然还有很多重要视图值得关注,但是如果只能列出9个视图?
将到Oracle的会话,就必须首先对V$SESSION这个视图中的每个列都非常熟悉。该视图在Oracle 11gR2下包含97列,在Oracle 12cR2下增加了6列,共包含103列。下面作者以表格的形式对这个视图中的重要列做详细说明。
表 3-26 V$SESSION视图
V$SESSION displays session information for each current session. | |||||
视图列序号 | 列 | 数据类型 | 说明 | 官方解释 | 备注 |
1 | SADDR | RAW(4 | 8) | 会话地址,对应于V$TRANSACTION.SES_ADDR列。 | Session address | |
2 | SID | NUMBER | 会话标识符。 | Session identifier | |
3 | SERIAL# | NUMBER | 会话序列号,用来唯一地标识会话对象。如果该会话结束且其它会话以相同的会话ID开始,那么可以保证会话级的命令被应用到正确的会话对象。 | 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. | |
4 | AUDSID | NUMBER | 审计会话ID,审查SESSION ID的唯一性,通常也用于寻找并行查询模式。 SELECT SID, OSUSER, USERNAME, MACHINE, PROCESS FROM V$SESSION WHERE AUDSID = USERENV('SESSIONID'); SELECT USERENV('LANGUAGE') 数据库字符集, USERENV('ISDBA') 是否DBA角色, USERENV('SESSIONID') 当前会话标识符, USERENV('ENTRYID') 可审计的会话标识符, USERENV('LANG') 会话语言名称的ISO简记, USERENV('INSTANCE') 当前的实例, USERENV('TERMINAL') 当前计算机名 FROM DUAL; |
Auditing session ID | |
5 | PADDR | RAW(4 | 8) | 拥有这个会话的进程地址,对应于V$PROCESS.ADDR列,通常用于查询会话对应的OS进程号: SELECT B.SID, B.SERIAL#, C.SPID FROM V$SESSION B, V$PROCESS C WHERE B.PADDR = C.ADDR; |
Address of the process that owns the session | |
6 | USER# | NUMBER | Oracle用户标识符。 | Oracle user identifier | |
7 | USERNAME | VARCHAR2(30) | Oracle用户名。 | Oracle username | |
8 | COMMAND | NUMBER | 正在执行的SQL语句类型(分析的最后一个语句)。关于该列值的含义,请参阅V$SQLCOMMAND.COMMAND列。如果该列的值为0,那么表示并没有在V$SESSION视图里记录。 | Command in progress (last statement parsed). You can find the command name for any value n returned in this COMMAND column by running this SQL query: SELECT command_name FROM v$sqlcommand WHERE command_type = n; A value of 0 in this COMMAND column means the command is not recorded in V$SESSION. |
sys.audit_actions |
9 | OWNERID | NUMBER | 如果值为2147483644,那么此列的内容无效,否则此列包含拥有可移植会话的用户标符。对于利用并行从服务器的操作,将这个值解释为一个4字节的值,其低位两字节表示会话号,而高位字节表示查询协调程序的实例ID。 | 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. |
|
10 | TADDR | VARCHAR2(8) | 表示事务处理状态对象的地址,对应于V$TRANSACTION.ADDR列。 | Address of the transaction state object | |
11 | LOCKWAIT | VARCHAR2(8) | 等待锁的地址,对应于V$LOCK的KADDR列;若当前会话没有被阻塞则为空 | Address of the lock the session is waiting for; NULL if none | |
12 | STATUS | VARCHAR2(8) | 会话的状态: ?ACTIVE:当前正在执行SQL语句(waiting for/using a resource); ?INACTIVE:等待操作(即等待需要执行的SQL语句); ?KILLED:标记为终止,删除; ?CACHED:为Oracle*XA使用而临时高速缓存; ?SNIPED:会话不活动,在客户机上等待,该状态不再被允许变为ACTIVE。 |
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. |
|
13 | SERVER | VARCHAR2(9) | 表示服务器类型:DEDICATED、SHARED、PSEUDO、POOLED、NONE。若显示的结果中有NONE或SHARED,则说明当前数据库启动了共享服务器模式。其中,状态为NONE的会话表示空闲的共享服务器连接,说明当前会话没有处理任务;若进程正在执行某些任务则会表现为SHARED状态。PSEUDO和“ALTER SYSTEM KILL SESSION sid,serial#;”相关,如果发出ALTER SYSTEM去终止一个会话,被标记为终止的SESSION在V$SEESSION的STATUS为KILLED,对应的SERVER值为PSEUDO。POOLED和Oracle 11g推出的驻留连接池(Database Resident Connection Pool)特性相关,驻留连接池提供了数据库层面上的连接池管理机制,为应对高并发、短会话前端应用进行有益的尝试,POOLED表示使用驻留连接池技术的连接。 | Server type: ?DEDICATED ?SHARED ?PSEUDO ?POOLED ?NONE |
|
14 | SCHEMA# | NUMBER | 模式用户标识符。 | Schema user identifier | |
15 | SCHEMANAME | VARCHAR2(30) | 模式用户名。 | Schema user name | |
16 | OSUSER | VARCHAR2(30) | 操作系统客户端用户名。 | Operating system client user name | |
17 | PROCESS | VARCHAR2(24) | 操作系统的客户端进程ID,即客户端进程在客户端机器上的进程ID号;V$PROCESS中的SPID表示的是操作系统的进程ID,即服务器进程在服务器上的进程ID。若客户端为Windows系统,则该列的值格式为“客户端进程ID:线程ID”。对于后台进程而言(TYPE='BACKGROUND'),该列的值和V$PROCESS中的SPID的值是一致的。 | Operating system client process ID | |
18 | MACHINE | VARCHAR2(64) | 操作系统机器名。 | Operating system machine name | |
19 | PORT | NUMBER | 客户端端口号。 | Client port number | |
20 | TERMINAL | VARCHAR2(30) | 操作系统终端名。 | Operating system terminal name | |
21 | PROGRAM | VARCHAR2(48) | 操作系统程序名。 | Operating system program name | |
22 | TYPE | VARCHAR2(10) | 会话类型,BACKGROUND表示后台进程,USER表示用户进程。 | Session type | |
23 | SQL_ADDRESS | RAW(4 | 8) | 与SQL_HASH_VALUE一道使用标识当前正在执行的SQL语句。 | Used with SQL_HASH_VALUE to identify the SQL statement that is currently being executed | |
24 | SQL_HASH_VALUE | NUMBER | 与SQL_ADDRESS一道使用标识当前正在执行的SQL语句。 | Used with SQL_ADDRESS to identify the SQL statement that is currently being executed | |
25 | SQL_ID | VARCHAR2(13) | 正在执行的SQL语句ID | SQL identifier of the SQL statement that is currently being executed | |
26 | SQL_CHILD_NUMBER | NUMBER | 正在执行的SQL语句的子游标的ID,从0开始 | Child number of the SQL statement that is currently being executed | |
27 | SQL_EXEC_START | DATE | 该会话开始执行该SQL语句的时间。若SQL_ID为空,则该列为空。 | Time when the execution of the SQL currently executed by this session started; NULL if SQL_ID is NULL | |
28 | SQL_EXEC_ID | NUMBER | SQL执行的标识符ID。若SQL_ID为空或SQL还未开始执行,则该列为空。对应于V$SQL_MONITOR.SQL_EXEC_ID列。 | SQL execution identifier; NULL if SQL_ID is NULL or if the execution of that SQL has not yet started (see V$SQL_MONITOR) | |
29 | PREV_SQL_ADDR | RAW(4 | 8) | 与PREV_HASH_VALUE一起使用标识上一次执行的SQL语句。 | Used with PREV_HASH_VALUE to identify the last SQL statement executed | |
30 | PREV_HASH_VALUE | NUMBER | 与SQL_HASH_VALUE一起使用标识上一次执行的SQL语句。 | Used with SQL_HASH_VALUE to identify the last SQL statement executed | |
31 | PREV_SQL_ID | VARCHAR2(13) | 上一次执行的SQL语句ID。 | SQL identifier of the last SQL statement executed | |
32 | PREV_CHILD_NUMBER | NUMBER | 上一次执行的SQL语句的子游标ID。 | Child number of the last SQL statement executed | |
33 | PREV_EXEC_START | DATE | 上一次执行SQL语句的开始时间。 | SQL execution start of the last executed SQL statement | |
34 | PREV_EXEC_ID | NUMBER | 上一次执行SQL语句的执行ID。对应于V$SQL_MONITOR.SQL_EXEC_ID列。 | SQL execution identifier of the last executed SQL statement | |
35 | PLSQL_ENTRY_OBJECT_ID | NUMBER | Object ID of the top-most PL/SQL subprogram on the stack; NULL if there is no PL/SQL subprogram on the stack | ||
36 | PLSQL_ENTRY_SUBPROGRAM_ID | NUMBER | Subprogram ID of the top-most PL/SQL subprogram on the stack; NULL if there is no PL/SQL subprogram on the stack | ||
37 | PLSQL_OBJECT_ID | NUMBER | Object ID of the currently executing PL/SQL subprogram; NULL if executing SQL | ||
38 | PLSQL_SUBPROGRAM_ID | NUMBER | Subprogram ID of the currently executing PL/SQL object; NULL if executing SQL | ||
39 | VARCHAR2(48) | 包含当前正在执行的模块名,正如由调用DBMS_APPLICATION_INFO.SET_MODULE过程所设置MODULE_HASHNUMBER上面MODULE的散列值。 | Name of the currently executing module as set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure | ||
40 | MODULE_HASH | NUMBER | MODULE列的HASH值。 | Hash value of the MODULE column | |
41 | VARCHAR2(32) | 包含当前执行活动的名称,正如由调用DBMS_APPLICATION_INFO.SET_ACTION过程所设置ACTION_HASHNUMBER上列活动名称的散列值。 | Name of the currently executing action as set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure | ||
42 | ACTION_HASH | NUMBER | ACTION列的HASH值。 | Hash value of the ACTION column | |
43 | CLIENT_INFO | VARCHAR2(64) | 由DBMS_APPLICATION_INFO.SET_CLIENT_INFO过程设置的信息。 | Information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure | |
44 | FIXED_TABLE_SEQUENCE | NUMBER | 此列包含一个数,每当会话完成一个数据库调用并且存在来自动态性能表的介入选择,它个数就增加。这个列可被性能监控程序用来监控数据库中的统计数据。每当性能监控程序查看数据库时,只需要查看当前活动的会话或在这个列中具有比上次性能监控程序所看到的最大值更大的值的会话即可。所有其他会话自上次性能监控程序查看数据库以来都是空闲的。 当session完成一个user call后就会增加的一个数值,也就是说,如果session inactive,它就不会增加。因此可以根据此字段的值变化来监控某个时间点以来的session的性能情况。例如,一个小时以前,某个session的FIXED_TABLE_SEQUENCE是10000,而现在是20000,则表明一个小时内其user call比较频繁,可以重点关注此session的performance statistics。 |
This contains a number that increases every time the session completes a call to the database and there has been an intervening select from a dynamic performance table. This column can be used by performance monitors to monitor statistics in the database. Each time the performance monitor looks at the database, it only needs to look at sessions that are currently active or have a higher value in this column than the highest value that the performance monitor saw the last time. All the other sessions have been idle since the last time the performance monitor looked at the database. | |
45 | ROW_WAIT_OBJ# | NUMBER | 被锁定行所在TABLE的OBJECT_ID,该列和DBA_OBJECTS中的OBJECT_ID关联可以得到被锁定的表名。 | Object ID for the table containing the row specified in ROW_WAIT_ROW# | |
46 | ROW_WAIT_FILE# | NUMBER | 被锁定行所在的数据文件号,该列和v$datafile中的file#关联可以得到数据文件名。此列仅在会话当前正在等待其它事务处理提交并且ROW_WAIT_OBJ#不为-1时有效。 | Identifier for the datafile containing the row specified in ROW_WAIT_ROW#. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1. | |
47 | ROW_WAIT_BLOCK# | NUMBER | 被锁定行所在的数据块号。此列仅在会话当前正在等待其它事务处理提交并且ROW_WAIT_OBJ#不为-1时有效。 | Identifier for the block containing the row specified in ROW_WAIT_ROW#. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1. | |
48 | ROW_WAIT_ROW# | NUMBER | 被锁定的当前行的行号。此列仅在会话当前正在等待其它事务处理提交并且ROW_WAIT_OBJ#不为-1时有效。 可以通过ROW_WAIT_OBJ#、ROW_WAIT_FILE#、ROW_WAIT_BLOCK#和ROW_WAIT_ROW#这4个字段查询现在正在被锁的表的相关信息(ROWID),例如,表名、文件名及行号。 SELECT DBMS_ROWID.ROWID_CREATE(1, (SELECT DATA_OBJECT_ID FROM DBA_OBJECTS WHERE OBJECT_ID = ROW_WAIT_OBJ#), ROW_WAIT_FILE#, ROW_WAIT_BLOCK#, ROW_WAIT_ROW#), A.ROW_WAIT_OBJ#, A.ROW_WAIT_FILE#, A.ROW_WAIT_BLOCK#, A.ROW_WAIT_ROW#, (SELECT D.OWNER || '.' || D.OBJECT_NAME FROM DBA_OBJECTS D WHERE OBJECT_ID = ROW_WAIT_OBJ#) OBJECT_NAME FROM V$SESSION A WHERE A.ROW_WAIT_OBJ# <> -1; |
Current row being locked. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1. | |
49 | TOP_LEVEL_CALL# | NUMBER | Oracle top level call number | ||
50 | LOGON_TIME | DATE | 用户的登录时间 | Time of logon | |
51 | LAST_CALL_ET | NUMBER | 用户最后一条语句执行完毕后到sysdate的时间,单位为秒。每次用户执行一个新的语句后,该字段复位为0,重新开始记数。可以通过该字段来获得一个连接用户最后一次操作数据库后的空闲时间。 | If the session STATUS is currently ACTIVE, then the value represents the elapsed time (in seconds) since the session has become active.If the session STATUS is currently INACTIVE, then the value represents the elapsed time (in seconds) since the session has become inactive. | |
52 | FAILOVER_TYPE | VARCHAR2(13) | 表示TAF的类型, 1.SESSION:表示在故障切换发生后,新的连接会被创建到正常实例,问题出现时正在运行的操作不会被继续执行。 2.SELECT:表示在故障切换发生后,新的连接会被创建到正常实例,问题出现时正在运行的SELECT语句会被继续执行,在新的节点上继续返回后续结果集,而已经返回的记录集则抛弃。 3.NONE:表示不会发生故障切换,即禁用TAF。 |
Indicates whether and to what extent transparent application failover (TAF) is enabled for the session: NONE - Failover is disabled for this session SESSION - Client is able to fail over its session following a disconnect SELECT - Client is able to fail over queries in progress as well See Also: Oracle Database Concepts for more information on TAF Oracle Database Net Services Administrator's Guide for information on configuring TAF |
|
53 | FAILOVER_METHOD | VARCHAR2(10) | 指定TAF的方法,可选项有BASIC(数据库会在故障切换时在目标实例中创建会话)和PRECONNECT(数据库会在最初建立连接时就同时建立到所有实例的连接,当发生故障时就可以立刻切换到其它链路上,这会对目标实例产生额外的工作负载)。需要注意的是,PRECONNECT选项只能用于客户端的TAF配置,不能用于服务端的TAF配置。BASIC方式在Failover时会有延迟,PRECONNECT方式虽然没有时间延迟,但是会建立多个冗余连接会消耗更多资源,两者就是用时间换资源和用资源换时间的区别。 | Indicates the transparent application failover method for the session: NONE - Failover is disabled for this session BASIC - Client itself reconnects following a disconnect PRECONNECT - Backup instance can support all connections from every instance for which it is backed up |
|
54 | FAILED_OVER | VARCHAR2(3) | 若当前会话运行在故障切换模式并进行过故障切换,则为TRUE,否则为FALSE。 | Indicates whether the session is running in failover mode and failover has occurred (YES) or not (NO) | |
55 | RESOURCE_CONSUMER_GROUP | VARCHAR2(32) | 会话的当前资源使用者组的名称 | Name of the session's current resource consumer group | |
56 | PDML_ENABLED | VARCHAR2(3) | 此列已被PDML_STATUS所替代。 | This column has been replaced by the PDML_STATUS column | |
57 | PDML_STATUS | VARCHAR2(8) | 如果ENABLED,那么会话正处于PARALLEL DML启用方式。如果DISABLED,那么此会话不支持PARALLEL DML启用方式。如果FORCED,那么会话已经更改为强制PARALLEL DML。 | If ENABLED, the session is in a PARALLEL DML enabled mode. If DISABLED, PARALLEL DML enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DML. | |
58 | PDDL_STATUS | VARCHAR2(8) | 如果ENABLED,那么会话正处于PARALLEL DDL启用方式。如果DISABLED,那么此会话不支持PARALLEL DDL启用方式。如果FORCED,那么会话已经更改为强制PARALLEL DDL。 | If ENABLED, the session is in a PARALLEL DDL enabled mode. If DISABLED, PARALLEL DDL enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DDL. | |
59 | PQ_STATUS | VARCHAR2(8) | 如果ENABLED,那么会话正处于PARALLEL QUERY启用方式。如果DISABLED,那么此会话不支持PARALLEL QUERY启用方式。如果FORCED,那么会话已经更改为强制PARALLEL QUERY。 | If ENABLED, the session is in a PARALLEL QUERY enabled mode. If DISABLED, PARALLEL QUERY enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL QUERY. | |
60 | CURRENT_QUEUE_DURATION | NUMBER | If queued (1), the current amount of time the session has been queued. If not currently queued, the value is 0. | ||
61 | CLIENT_IDENTIFIER | VARCHAR2(64) | 会话的客户端标识。 | Client identifier of the session | |
62 | BLOCKING_SESSION_STATUS | VARCHAR2(11) | 标识当前会话是否被阻塞。VALID表示当前会话被阻塞,可以通过BLOCKING_INSTANCE和 BLOCKING_SESSION列查找到阻塞会话;“NO HOLDER”表示没有被阻塞;“NOT IN WAIT”表示当前会话未等待;UNKNOWN表示未知。 | This column provides details on whether there is a blocking session: VALID - there is a blocking session, and it is identified in the BLOCKING_INSTANCE and BLOCKING_SESSION columns NO HOLDER - there is no session blocking this session NOT IN WAIT - this session is not in a wait UNKNOWN - the blocking session is unknown |
|
63 | BLOCKING_INSTANCE | NUMBER | 当BLOCKING_SESSION_STATUS的值为VALID时,该列表示阻塞会话的实例号(Instance Number)。 | Instance identifier of the blocking session. This column is valid only if BLOCKING_SESSION_STATUS has the value VALID. | |
64 | BLOCKING_SESSION | NUMBER | 当BLOCKING_SESSION_STATUS的值为VALID时,该列表示阻塞会话的SID。 | Session identifier of the blocking session. This column is valid only if BLOCKING_SESSION_STATUS has the value VALID. | |
65 | FINAL_BLOCKING_SESSION_STATUS | VARCHAR2(11) | The final blocking session is the final element in the wait chain constructed by following the sessions that are blocked by one another starting with this session. In the case of a cyclical wait chain, one of the sessions in the wait chain will be chosen as the final blocker. This column provides details on whether there is a final blocking session: VALID - there is a final blocking session and it is identified in the FINAL_BLOCKING_INSTANCE and FINAL_BLOCKING_SESSION columns NO HOLDER - there is no session blocking this session NOT IN WAIT - this session is not in a wait UNKNOWN - the final blocking session is unknown |
||
66 | FINAL_BLOCKING_INSTANCE | NUMBER | Instance identifier of the final blocking session. This column is valid only if FINAL_BLOCKING_SESSION_STATUS has the value VALID. | ||
67 | FINAL_BLOCKING_SESSION | NUMBER | Session identifier of the blocking session. This column is valid only if FINAL_BLOCKING_SESSION_STATUS has the value VALID. | ||
68 | SEQ# | NUMBER | A number that uniquely identifies the current or last wait (incremented for each wait) | ||
69 | EVENT# | NUMBER | 等待事件的事件号,对应于V$EVENT_NAME.EVENT#列。 | Event number | |
70 | EVENT | VARCHAR2(64) | 等待事件的名称,若为空则表示ON CPU。 | Resource or event for which the session is waiting See Also: Appendix C, "Oracle Wait Events" |
|
71 | P1TEXT | VARCHAR2(64) | Description of the first wait event parameter | ||
72 | P1 | NUMBER | First wait event parameter (in decimal) | ||
73 | P1RAW | RAW(8) | |||
74 | P2TEXT | VARCHAR2(64) | Description of the second wait event parameter | ||
75 | P2 | NUMBER | Second wait event parameter (in decimal) | ||
76 | P2RAW | RAW(8) | |||
77 | P3TEXT | VARCHAR2(64) | Description of the third wait event parameter | ||
78 | P3 | NUMBER | Third wait event parameter (in decimal) | ||
79 | P3RAW | RAW(8) | |||
80 | WAIT_CLASS_ID | NUMBER | Identifier of the class of the wait event | ||
81 | WAIT_CLASS# | NUMBER | Number of the class of the wait event | ||
82 | WAIT_CLASS | VARCHAR2(64) | Name of the class of the wait event | ||
83 | WAIT_TIME | NUMBER | If the session is currently waiting, then the value is 0. If the session is not in a wait, then the value is as follows: > 0 - Value is the duration of the last wait in hundredths of a second -1 - Duration of the last wait was less than a hundredth of a second -2 - Parameter TIMED_STATISTICS was set to false This column has been deprecated in favor of the columns WAIT_TIME_MICRO and STATE. |
||
84 | SECONDS_IN_WAIT | NUMBER | If the session is currently waiting, then the value is the amount of time waited for the current wait. If the session is not in a wait, then the value is the amount of time since the start of the last wait.This column has been deprecated in favor of the columns WAIT_TIME_MICRO and TIME_SINCE_LAST_WAIT_MICRO. | ||
85 | STATE | VARCHAR2(19) | Wait state: WAITING - Session is currently waiting WAITED UNKNOWN TIME - Duration of the last wait is unknown; this is the value when the parameter TIMED_STATISTICS is set to false WAITED SHORT TIME - Last wait was less than a hundredth of a second WAITED KNOWN TIME - Duration of the last wait is specified in the WAIT_TIME column |
||
86 | WAIT_TIME_MICRO | NUMBER | Amount of time waited (in microseconds). If the session is currently waiting, then the value is the time spent in the current wait. If the session is currently not in a wait, then the value is the amount of time waited in the last wait. | ||
87 | TIME_REMAINING_MICRO | NUMBER | Value is interpreted as follows: > 0 - Amount of time remaining for the current wait (in microseconds) 0 - Current wait has timed out -1 - Session can indefinitely wait in the current wait NULL - Session is not currently waiting |
||
88 | TIME_SINCE_LAST_WAIT_MICRO | NUMBER | Time elapsed since the end of the last wait (in microseconds). If the session is currently in a wait, then the value is 0. | ||
89 | SERVICE_NAME | VARCHAR2(64) | Service name of the session | ||
90 | SQL_TRACE | VARCHAR2(8) | Indicates whether SQL tracing is enabled (ENABLED) or disabled (DISABLED) | ||
91 | SQL_TRACE_WAITS | VARCHAR2(5) | Indicates whether wait tracing is enabled (TRUE) or not (FALSE) | ||
92 | SQL_TRACE_BINDS | VARCHAR2(5) | Indicates whether bind tracing is enabled (TRUE) or not (FALSE) | ||
93 | SQL_TRACE_PLAN_STATS | VARCHAR2(10) | Frequency at which row source statistics are dumped in the trace files for each cursor: never first_execution all_executions |
||
94 | SESSION_EDITION_ID | NUMBER | Shows the value that, in the session, would be reported by sys_context('USERENV', 'SESSION_EDITION_ID') | ||
95 | CREATOR_ADDR | RAW(4 | 8) | 对应V$PROCESS的ADDR列,若当前会话为KILLED状态的话,则可以使用该列来返回会话的地址。 | Address of the creating process or circuit | |
96 | CREATOR_SERIAL# | NUMBER | Serial number of the creating process or circuit | ||
97 | ECID | VARCHAR2(64) | Execution context identifier (sent by Application Server) | ||
98 | SQL_TRANSLATION_PROFILE_ID | NUMBER | Object number of the SQL translation profile | 12c | |
99 | PGA_TUNABLE_MEM | NUMBER | The amount of tunable PGA memory (in bytes). Untunable memory is PGA_ALLOC_MEM from V$PROCESS minus PGA_TUNABLE_MEM from V$SESSION. |
12c | |
100 | SHARD_DDL_STATUS | VARCHAR2(8) | Indicates whether shard DDL is enabled in the current session (ENABLED) or not (DISABLED). This value is only relevant for the shard catalog database. |
12cR2 | |
101 | CON_ID | NUMBER | The ID of the container to which the data pertains. Possible values include: 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs. 1: This value is used for rows containing data that pertain to only the root n: Where n is the applicable container ID for the rows containing data |
12c | |
102 | EXTERNAL_NAME | VARCHAR2(1024) | External name of the database user. For enterprise users, returns the Oracle Internet Directory DN. | 12c | |
103 | VARCHAR2(5) | Indicates whether the session is connected to a PL/SQL debugger. Possible values: TRUE FALSE |
12c |
标签:VARCHAR2,NUMBER,视图,session,SQL,ORACLE,相关,ID,WAIT From: https://www.cnblogs.com/xulinforDB/p/14958511.html