V$SESSION

V$SESSION

版本:Oracle 11g

显示每个当前会话的会话信息。

 

字段名

数据类型

描述

中文描述

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.

会话序列号。用于唯一标识会话的对象。如果会话结束并且另一个会话以相同的会话ID开头,则确保将会话级命令应用于正确的会话对象。

AUDSID

NUMBER

Auditing session ID

审核会话ID

PADDR

RAW(4 | 8)

Address of the process that owns the session

拥有会话的进程的地址

USER#

NUMBER

Oracle user identifier

Oracle用户标识

USERNAME

VARCHAR2(30)

Oracle username

Oracle用户名

COMMAND

NUMBER

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.

命令正在执行(已解析最后一条语句)。

通过运行以下SQL查询,可以找到此列中返回的任何值n的命令名称COMMAND

SELECT command_name
   从v $ sqlcommand
   WHERE command_type = n ;

0COMMAND列中的值表示该命令未记录在中V$SESSION

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.

拥有可迁移会话的用户的标识符;如果值为,则列内容无效2147483644

对于使用并行从设备的操作,将此值解释为4字节的值。低位2个字节代表会话号,高位2个字节代表查询协调器的实例ID

TADDR

VARCHAR2(8)

Address of the transaction state object

交易状态对象的地址

LOCKWAIT

VARCHAR2(8)

Address of the lock the session is waiting for; NULL if none

会话正在等待的锁的地址;如果没有则为NULL

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.

会话状态:

  • ACTIVE -当前正在执行SQL的会话
  • INACTIVE -会话处于非活动状态,或者没有配置的限制,或者尚未超过配置的限制
  • KILLED -会话被标记为被杀死
  • CACHED -临时缓存的会话供​​Oracle * XA使用
  • SNIPED-超出某些已配置限制的非活动会话(例如,为资源管理器使用者组指定的资源限制或用户配置文件中指定的idle_time)。此类会话将不允许再次激活。

SERVER

VARCHAR2(9)

Server type:

  • DEDICATED
  • SHARED
  • PSEUDO
  • POOLED
  • NONE

服务器类型:

  • DEDICATED
  • SHARED
  • PSEUDO
  • POOLED
  • NONE

SCHEMA#

NUMBER

Schema user identifier

模式用户标识符

SCHEMANAME

VARCHAR2(30)

Schema user name

模式用户名

OSUSER

VARCHAR2(30)

Operating system client user name

操作系统客户端用户名

PROCESS

VARCHAR2(24)

Operating system client process ID

操作系统客户端进程ID

MACHINE

VARCHAR2(64)

Operating system machine name

操作系统机器名称

PORT

NUMBER

Client port number

客户端端口号

TERMINAL

VARCHAR2(30)

Operating system terminal name

操作系统终端名称

PROGRAM

VARCHAR2(48)

Operating system program name

操作系统程序名称

TYPE

VARCHAR2(10)

Session type

会话类型

SQL_ADDRESS

RAW(4 | 8)

Used with SQL_HASH_VALUE to identify the SQL statement that is currently being executed

用于SQL_HASH_VALUE标识当前正在执行的SQL语句

SQL_HASH_VALUE

NUMBER

Used with SQL_ADDRESS to identify the SQL statement that is currently being executed

用于SQL_ADDRESS标识当前正在执行的SQL语句

SQL_ID

VARCHAR2(13)

SQL identifier of the SQL statement that is currently being executed

当前正在执行的SQL语句的SQL标识符

SQL_CHILD_NUMBER

NUMBER

Child number of the SQL statement that is currently being executed

当前正在执行的SQL语句的子代号

SQL_EXEC_START

DATE

Time when the execution of the SQL currently executed by this session started; NULL if SQL_ID is NULL

开始由该会话当前执行的SQL的执行时间;如果SQL_IDNULL ,则为NULL

SQL_EXEC_ID

NUMBER

SQL execution identifier; NULL if SQL_ID is NULL or if the execution of that SQL has not yet started (see V$SQL_MONITOR)

SQL执行标识符;如果SQL_IDNULL或尚未开始执行该SQL,则为NULL(请参阅参考资料V$SQL_MONITOR

PREV_SQL_ADDR

RAW(4 | 8)

Used with PREV_HASH_VALUE to identify the last SQL statement executed

用于PREV_HASH_VALUE标识最后执行的SQL语句

PREV_HASH_VALUE

NUMBER

Used with SQL_HASH_VALUE to identify the last SQL statement executed

用于SQL_HASH_VALUE标识最后执行的SQL语句

PREV_SQL_ID

VARCHAR2(13)

SQL identifier of the last SQL statement executed

最后执行的SQL语句的SQL标识符

PREV_CHILD_NUMBER

NUMBER

Child number of the last SQL statement executed

最后执行的SQL语句的子编号

PREV_EXEC_START

DATE

SQL execution start of the last executed SQL statement

最后执行的SQL语句的SQL执行开始

PREV_EXEC_ID

NUMBER

SQL execution identifier of the last executed SQL statement

最后执行的SQL语句的SQL执行标识符

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

堆栈上最顶层的PL / SQL子程序的对象ID;如果堆栈上没有PL / SQL子程序,则为NULL

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

堆栈中最顶层的PL / SQL子程序的子程序ID;如果堆栈上没有PL / SQL子程序,则为NULL

PLSQL_OBJECT_ID

NUMBER

Object ID of the currently executing PL/SQL subprogram; NULL if executing SQL

当前正在执行的PL / SQL子程序的对象ID;如果执行SQL,则为NULL

PLSQL_SUBPROGRAM_ID

NUMBER

Subprogram ID of the currently executing PL/SQL object; NULL if executing SQL

当前正在执行的PL / SQL对象的子程序ID;如果执行SQL,则为NULL

MODULEFoot 1 

VARCHAR2(48)

Name of the currently executing module as set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure

通过调用DBMS_APPLICATION_INFO.SET_MODULE过程设置的当前执行模块的名称

MODULE_HASH

NUMBER

Hash value of the MODULE column

MODULE列的哈希值

ACTIONFootref 1

VARCHAR2(32)

Name of the currently executing action as set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure

通过调用DBMS_APPLICATION_INFO.SET_ACTION过程设置的当前正在执行的动作的名称

ACTION_HASH

NUMBER

Hash value of the ACTION column

ACTION列的哈希值

CLIENT_INFO

VARCHAR2(64)

Information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure

DBMS_APPLICATION_INFO.SET_CLIENT_INFO程序设定的信息

FIXED_TABLE_SEQUENCE

NUMBER

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.

每次会话完成对数据库的调用并且动态性能表中存在中间选择时,此数字都会增加。性能监视器可以使用此列来监视数据库中的统计信息。每次性能监视器查看数据库时,它只需要查看当前处于活动状态的会话或该列中的值大于性能监视器上次看到的最大值的会话。自性能监视器上次查看数据库以来,所有其他会话一直处于空闲状态。

ROW_WAIT_OBJ#

NUMBER

Object ID for the table containing the row specified in ROW_WAIT_ROW#

包含在中指定的行的表的对象ID ROW_WAIT_ROW#

ROW_WAIT_FILE#

NUMBER

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.

包含中指定行的数据文件的标识符ROW_WAIT_ROW#。仅当会话当前正在等待另一个事务提交且的值ROW_WAIT_OBJ#不是时,此列才有效-1

ROW_WAIT_BLOCK#

NUMBER

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.

包含中指定行的块的标识符ROW_WAIT_ROW#。仅当会话当前正在等待另一个事务提交且的值ROW_WAIT_OBJ#不是时,此列才有效-1

ROW_WAIT_ROW#

NUMBER

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.

当前行被锁定。仅当会话当前正在等待另一个事务提交且的值ROW_WAIT_OBJ#不是时,此列才有效-1

TOP_LEVEL_CALL#

NUMBER

Oracle top level call number

Oracle顶级电话号码

LOGON_TIME

DATE

Time of logon

登录时间

LAST_CALL_ET

NUMBER

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.

如果会话STATUS当前为ACTIVE,则该值表示自会话变为活动状态以来经过的时间(以秒为单位)。

如果会话STATUS当前为INACTIVE,则该值表示自会话变为非活动状态以来经过的时间(以秒为单位)。

PDML_ENABLED

VARCHAR2(3)

This column has been replaced by the PDML_STATUS column

此列已被替换为PDML_STATUS

FAILOVER_TYPE

VARCHAR2(13)

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:

指示是否为会话启用透明应用程序故障转移(TAF),以及在何种程度上启用了透明应用程序故障转移(TAF):

  • NONE -为此会话禁用了故障转移
  • SESSION -断开连接后,客户端可以故障转移会话
  • SELECT -客户端也可以对正在进行的查询进行故障转移

也可以看看:

FAILOVER_METHOD

VARCHAR2(10)

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

指示会话的透明应用程序故障转移方法:

  • NONE -为此会话禁用了故障转移
  • BASIC -客户端在断开连接后重新连接
  • PRECONNECT -备份实例可以支持其备份的每个实例的所有连接

FAILED_OVER

VARCHAR2(3)

Indicates whether the session is running in failover mode and failover has occurred (YES) or not (NO)

指示会话是否以故障转移模式运行,并且是否已发生故障转移YESNO

RESOURCE_CONSUMER_GROUP

VARCHAR2(32)

Name of the session's current resource consumer group

会话当前资源使用者组的名称

PDML_STATUS

VARCHAR2(8)

If ENABLED, the session is in a PARALLEL DML enabled mode. If DISABLEDPARALLEL DML enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DML.

如果为ENABLED,则会话处于PARALLEL DML启用模式。如果DISABLEDPARALLEL DML不支持会话启动模式。如果FORCED,会话已更改为强制PARALLEL DML

PDDL_STATUS

VARCHAR2(8)

If ENABLED, the session is in a PARALLEL DDL enabled mode. If DISABLEDPARALLEL DDL enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DDL.

如果为ENABLED,则会话处于PARALLEL DDL启用模式。如果DISABLEDPARALLEL DDL不支持会话启动模式。如果FORCED,会话已更改为强制PARALLEL DDL

PQ_STATUS

VARCHAR2(8)

If ENABLED, the session is in a PARALLEL QUERY enabled mode. If DISABLEDPARALLEL QUERY enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL QUERY.

如果为ENABLED,则会话处于PARALLEL QUERY启用模式。如果DISABLEDPARALLEL QUERY不支持会话启动模式。如果FORCED,会话已更改为强制PARALLEL QUERY

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.

如果已排队(1),则为会话已排队的当前时间。如果当前尚未排队,则值为0

CLIENT_IDENTIFIER

VARCHAR2(64)

Client identifier of the session

会话的客户端标识符

BLOCKING_SESSION_STATUS

VARCHAR2(11)

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

此列提供有关是否存在阻止会话的详细信息:

  • VALID-存在阻止会话,该会话在BLOCKING_INSTANCEBLOCKING_SESSION列中标识
  • NO HOLDER -没有会话阻止此会话
  • NOT IN WAIT -此会话没有等待
  • UNKNOWN -阻止会话未知

BLOCKING_INSTANCE

NUMBER

Instance identifier of the blocking session. This column is valid only if BLOCKING_SESSION_STATUS has the value VALID.

阻止会话的实例标识符。只有BLOCKING_SESSION_STATUS具有值的此列才有效VALID

BLOCKING_SESSION

NUMBER

Session identifier of the blocking session. This column is valid only if BLOCKING_SESSION_STATUS has the value VALID.

阻止会话的会话标识符。只有BLOCKING_SESSION_STATUS具有值的此列才有效VALID

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

最终阻止会话是等待链中的最后一个元素,该等待链是通过从此会话开始彼此跟踪被阻止的会话而构建的。对于周期性等待链,将选择等待链中的会话之一作为最终阻止者。

此列提供有关是否存在最终阻止会话的详细信息:

  • VALID-有一个最终的阻止会话,它在FINAL_BLOCKING_INSTANCEFINAL_BLOCKING_SESSION列中标识
  • NO HOLDER -没有会话阻止此会话
  • NOT IN WAIT -此会话没有等待
  • UNKNOWN -最终的阻止会话未知

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.

最终阻止会话的实例标识符。只有FINAL_BLOCKING_SESSION_STATUS具有值的此列才有效VALID

FINAL_BLOCKING_SESSION

NUMBER

Session identifier of the blocking session. This column is valid only if FINAL_BLOCKING_SESSION_STATUS has the value VALID.

阻止会话的会话标识符。只有FINAL_BLOCKING_SESSION_STATUS具有值的此列才有效VALID

SEQ#

NUMBER

A number that uniquely identifies the current or last wait (incremented for each wait)

一个唯一标识当前或上一次等待的数字(每次等待增加)

EVENT#

NUMBER

Event number

活动编号

EVENT

VARCHAR2(64)

Resource or event for which the session is waiting

See Also: Appendix C, "Oracle Wait Events"

会话正在等待的资源或事件

另请参见: 附录C“ Oracle等待事件

P1TEXT

VARCHAR2(64)

Description of the first wait event parameter

第一个等待事件参数的描述

P1

NUMBER

First wait event parameter (in decimal)

首次等待事件参数(十进制)

P1RAW

RAW(8)

First wait event parameter (in hexadecimal)Foot 2 

首次等待事件参数(以十六进制表示)Foot 2 

P2TEXT

VARCHAR2(64)

Description of the second wait event parameter

第二个等待事件参数的描述

P2

NUMBER

Second wait event parameter (in decimal)

第二个等待事件参数(十进制)

P2RAW

RAW(8)

Second wait event parameter (in hexadecimal)Footref 2

第二个等待事件参数(十六进制)Footref 2

P3TEXT

VARCHAR2(64)

Description of the third wait event parameter

第三个等待事件参数的描述

P3

NUMBER

Third wait event parameter (in decimal)

第三个等待事件参数(十进制)

P3RAW

RAW(8)

Third wait event parameter (in hexadecimal)Footref 2

第三个等待事件参数(以十六进制表示)Footref 2

WAIT_CLASS_ID

NUMBER

Identifier of the class of the wait event

等待事件的类别的标识符

WAIT_CLASS#

NUMBER

Number of the class of the wait event

等待事件的类别编号

WAIT_CLASS

VARCHAR2(64)

Name of the class of the wait event

等待事件的类的名称

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.

如果会话当前正在等待,则值为0。如果会话不在等待中,则值如下:

  • 0-值是最后一次等待的持续时间,以百分之一秒为单位
  • -1 -上一次等待的持续时间少于百分之一秒
  • -2-参数TIMED_STATISTICS设置为false

不推荐使用此列,而推荐使用列WAIT_TIME_MICROSTATE

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.

如果会话当前正在等待,则该值为等待当前等待的时间。如果会话不在等待中,则该值为自上次等待开始以来的时间。

不推荐使用此列,而推荐使用列WAIT_TIME_MICROTIME_SINCE_LAST_WAIT_MICRO

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

等待状态:

  • WAITING -会话当前正在等待
  • WAITED UNKNOWN TIME-上一次等待的持续时间未知;这是参数TIMED_STATISTICS设置为时的值false
  • WAITED SHORT TIME -上一次等待时间不到百分之一秒
  • WAITED KNOWN TIME-最后等待的持续时间在WAIT_TIME列中指定

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.

等待的时间(以微秒为单位)。如果会话当前正在等待,则该值为当前等待中花费的时间。如果会话当前不在等待中,则该值为上一次等待中等待的时间。

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

值解释如下:

  • 0-当前等待的剩余时间(以微秒为单位)
  • 0 -当前等待已超时
  • -1 -会话可以在当前等待中无限期等待
  • NULL-会话当前未在等待

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.

自上次等待结束以来经过的时间(以微秒为单位)。如果会话当前正在等待,则值为0

SERVICE_NAME

VARCHAR2(64)

Service name of the session

会话的服务名称

SQL_TRACE

VARCHAR2(8)

Indicates whether SQL tracing is enabled (ENABLED) or disabled (DISABLED)

指示是启用(ENABLED)还是禁用(DISABLEDSQL跟踪

SQL_TRACE_WAITS

VARCHAR2(5)

Indicates whether wait tracing is enabled (TRUE) or not (FALSE)

指示是否启用等待跟踪(TRUE)(FALSE

SQL_TRACE_BINDS

VARCHAR2(5)

Indicates whether bind tracing is enabled (TRUE) or not (FALSE)

指示绑定跟踪是否被启用(TRUE)否(FALSE

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

每个游标在跟踪文件中转储行源统计信息的频率:

  • never
  • first_execution
  • all_executions

SESSION_EDITION_ID

NUMBER

Shows the value that, in the session, would be reported by sys_context('USERENV', 'SESSION_EDITION_ID')

显示在会话中将由以下人员报告的值 sys_context('USERENV', 'SESSION_EDITION_ID')

CREATOR_ADDR

RAW(4 | 8)

Address of the creating process or circuit

创建过程或电路的地址

CREATOR_SERIAL#

NUMBER

Serial number of the creating process or circuit

创建过程或电路的序列号

ECID

VARCHAR2(64)

Execution context identifier (sent by Application Server)

执行上下文标识符(由Application Server发送)

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值