您好,欢迎访问一九零五行业门户网

oracle官方文档之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
v$sessionv$session displays session information for each current session.
columndatatypedescription
saddrraw(4 | 8) session address
sidnumber 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.
audsidnumber auditing session id
paddrraw(4 | 8) address of the process that owns the session
user#number oracle user identifier
usernamevarchar2(30) oracle username
commandnumber command in progress (last statement parsed).you can find the command name for any value n returned in thiscommand 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 inv$session.
owneridnumber identifier of the user who owns the migratable session; the column contents are invalid if the value is2147483644for 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.
taddrvarchar2(8) address of the transaction state object
lockwaitvarchar2(8) address of the lock the session is waiting for; null if none
statusvarchar2(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.
servervarchar2(9) server type:dedicated
shared
pseudo
pooled
none
schema#number schema user identifier
schemanamevarchar2(30) schema user name
osuservarchar2(30) operating system client user name
processvarchar2(24) operating system client process id
machinevarchar2(64) operating system machine name
portnumber client port number
terminalvarchar2(30) operating system terminal name
programvarchar2(48) operating system program name
typevarchar2(10) session type
sql_addressraw(4 | 8) used with sql_hash_value to identify the sql statement that is currently being executed
sql_hash_valuenumber used with sql_address to identify the sql statement that is currently being executed
sql_idvarchar2(13) sql identifier of the sql statement that is currently being executed
sql_child_numbernumber child number of the sql statement that is currently being executed
sql_exec_startdate time when the execution of the sql currently executed by this session started; null ifsql_id is null
sql_exec_idnumber sql execution identifier; null ifsql_id is null or if the execution of that sql has not yet started (seev$sql_monitor)
prev_sql_addrraw(4 | 8) used with prev_hash_value to identify the last sql statement executed
prev_hash_valuenumber used with sql_hash_value to identify the last sql statement executed
prev_sql_idvarchar2(13) sql identifier of the last sql statement executed
prev_child_numbernumber child number of the last sql statement executed
prev_exec_startdate sql execution start of the last executed sql statement
prev_exec_idnumber sql execution identifier of the last executed sql statement
plsql_entry_object_idnumber object id of the top-most pl/sql subprogram on the stack; null if there is no pl/sql subprogram on the stack
plsql_entry_subprogram_idnumber subprogram id of the top-most pl/sql subprogram on the stack; null if there is no pl/sql subprogram on the stack
plsql_object_idnumber object id of the currently executing pl/sql subprogram; null if executing sql
plsql_subprogram_idnumber subprogram id of the currently executing pl/sql object; null if executing sql
modulefoot 1 varchar2(48) name of the currently executing module as set by calling thedbms_application_info.set_module procedure
module_hashnumber hash value of the module column
actionfootref 1varchar2(32) name of the currently executing action as set by calling thedbms_application_info.set_action procedure
action_hashnumber hash value of the action column
client_infovarchar2(64) information set by thedbms_application_info.set_client_info procedure
fixed_table_sequencenumber 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 inrow_wait_row#
row_wait_file#number identifier for the datafile containing the row specified inrow_wait_row#. this column is valid only if the session is currently waiting for another transaction to commit and the value ofrow_wait_obj# is not -1.
row_wait_block#number identifier for the block containing the row specified inrow_wait_row#. this column is valid only if the session is currently waiting for another transaction to commit and the value ofrow_wait_obj# is not -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 ofrow_wait_obj# is not -1.
top_level_call#number oracle top level call number
logon_timedate time of logon
last_call_etnumber if the session status is currentlyactive, 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.
pdml_enabledvarchar2(3) this column has been replaced by thepdml_status column
failover_typevarchar2(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:
oracle database concepts for more information on taf
oracle database net services administrator's guide for information on configuring taf
failover_methodvarchar2(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
failed_overvarchar2(3) indicates whether the session is running in failover mode and failover has occurred (yes) or not (no)
resource_consumer_groupvarchar2(32) name of the session's current resource consumer group
pdml_statusvarchar2(8) if enabled, the session is in aparallel dml enabled mode. if disabled, parallel dml enabled mode is not supported for the session. ifforced, the session has been altered to force parallel dml.
pddl_statusvarchar2(8) if enabled, the session is in aparallel ddl enabled mode. if disabled, parallel ddl enabled mode is not supported for the session. ifforced, the session has been altered to force parallel ddl.
pq_statusvarchar2(8) if enabled, the session is in aparallel query enabled mode. if disabled, parallel query enabled mode is not supported for the session. ifforced, the session has been altered to force parallel query.
current_queue_durationnumber if queued (1), the current amount of time the session has been queued. if not currently queued, the value is0.
client_identifiervarchar2(64) client identifier of the session
blocking_session_statusvarchar2(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
blocking_instancenumber instance identifier of the blocking session. this column is valid only ifblocking_session_status has the value valid.
blocking_sessionnumber session identifier of the blocking session. this column is valid only ifblocking_session_status has the value valid.
final_blocking_session_statusvarchar2(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 thefinal_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
final_blocking_instancenumber instance identifier of the final blocking session. this column is valid only iffinal_blocking_session_status has the value valid.
final_blocking_sessionnumber session identifier of the blocking session. this column is valid only iffinal_blocking_session_status has the value valid.
seq#number a number that uniquely identifies the current or last wait (incremented for each wait)
event#number event number
eventvarchar2(64) resource or event for which the session is waitingsee also: appendix c, oracle wait events
p1textvarchar2(64) description of the first wait event parameter
p1number first wait event parameter (in decimal)
p1rawraw(8) first wait event parameter (in hexadecimal)foot 2 
p2textvarchar2(64) description of the second wait event parameter
p2number second wait event parameter (in decimal)
p2rawraw(8) second wait event parameter (in hexadecimal)footref 2
p3textvarchar2(64) description of the third wait event parameter
p3number third wait event parameter (in decimal)
p3rawraw(8) third wait event parameter (in hexadecimal)footref 2
wait_class_idnumber identifier of the class of the wait event
wait_class#number number of the class of the wait event
wait_classvarchar2(64) name of the class of the wait event
wait_timenumber if the session is currently waiting, then the value is0. 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 andstate.
seconds_in_waitnumber 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 andtime_since_last_wait_micro.
statevarchar2(19) wait state:waiting - session is currently waiting
waited unknown time - duration of the last wait is unknown; this is the value when the parametertimed_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 thewait_time column
wait_time_micronumber 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_micronumber 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
time_since_last_wait_micronumber time elapsed since the end of the last wait (in microseconds). if the session is currently in a wait, then the value is0.
service_namevarchar2(64) service name of the session
sql_tracevarchar2(8) indicates whether sql tracing is enabled (enabled) or disabled (disabled)
sql_trace_waitsvarchar2(5) indicates whether wait tracing is enabled (true) or not (false)
sql_trace_bindsvarchar2(5) indicates whether bind tracing is enabled (true) or not (false)
sql_trace_plan_statsvarchar2(10) frequency at which row source statistics are dumped in the trace files for each cursor:never
first_execution
all_executions
session_edition_idnumber shows the value that, in the session, would be reported bysys_context('userenv', 'session_edition_id')
creator_addrraw(4 | 8) address of the creating process or circuit
creator_serial#number serial number of the creating process or circuit
ecidvarchar2(64) execution context identifier (sent by application server)
footnote 1 the datatype of this column isvarchar2(64) starting with oracle database 11g release 2 (11.2.0.2).
footnote 2 the p1raw,p2raw, and p3raw columns display the same values as thep1, p2, and p3 columns, except that the numbers are displayed in hexadecimal.
see also:
oracle database performance tuning guide for an example of usingv$session to determine which sessions are waiting for i/o
oracle database performance tuning guide for an example of usingv$session to help identify an object that is waiting for buffer busy waits
其它类似信息

推荐信息