從Oracle
關於V$SESSION在幾個版本中結構變化可以參考:Oracle數據字典說明
從Oracle
這一變化使得我們的查詢得以簡化
此外V$SESSION中還增加了BLOCKING_SESSION等字段
在Oracle
SERVICE_NAME
SQL_TRACE
SQL_TRACE_WAITS
SQL_TRACE_BINDS
這幾個字段又顯示當前session連接方式及是否啟用sql_trace等
我們看到Oracle在小處動的手腳是非常多的
以下是Oracle
SQL> desc v$session
Name Null? Type
SADDR RAW(
SID NUMBER
SERIAL# NUMBER
AUDSID NUMBER
PADDR RAW(
USER# NUMBER
USERNAME VARCHAR
COMMAND NUMBER
OWNERID NUMBER
TADDR VARCHAR
LOCKWAIT VARCHAR
STATUS VARCHAR
SERVER VARCHAR
SCHEMA# NUMBER
SCHEMANAME VARCHAR
OSUSER VARCHAR
PROCESS VARCHAR
MACHINE VARCHAR
TERMINAL VARCHAR
PROGRAM VARCHAR
TYPE VARCHAR
SQL_ADDRESS RAW(
SQL_HASH_VALUE NUMBER
SQL_ID VARCHAR
SQL_CHILD_NUMBER NUMBER
PREV_SQL_ADDR RAW(
PREV_HASH_VALUE NUMBER
PREV_SQL_ID VARCHAR
PREV_CHILD_NUMBER NUMBER
MODULE VARCHAR
MODULE_HASH NUMBER
ACTION VARCHAR
ACTION_HASH NUMBER
CLIENT_INFO VARCHAR
FIXED_TABLE_SEQUENCE NUMBER
ROW_WAIT_OBJ# NUMBER
ROW_WAIT_FILE# NUMBER
ROW_WAIT_BLOCK# NUMBER
ROW_WAIT_ROW# NUMBER
LOGON_TIME DATE
LAST_CALL_ET NUMBER
PDML_ENABLED VARCHAR
FAILOVER_TYPE VARCHAR
FAILOVER_METHOD VARCHAR
FAILED_OVER VARCHAR
RESOURCE_CONSUMER_GROUP VARCHAR
PDML_STATUS VARCHAR
PDDL_STATUS VARCHAR
PQ_STATUS VARCHAR
CURRENT_QUEUE_DURATION NUMBER
CLIENT_IDENTIFIER VARCHAR
BLOCKING_SESSION_STATUS VARCHAR
BLOCKING_INSTANCE NUMBER
BLOCKING_SESSION NUMBER
SEQ# NUMBER
EVENT# NUMBER
EVENT VARCHAR
P
P
P
P
P
P
P
P
P
WAIT_CLASS_ID NUMBER
WAIT_CLASS# NUMBER
WAIT_CLASS VARCHAR
WAIT_TIME NUMBER
SECONDS_IN_WAIT NUMBER
STATE VARCHAR
SERVICE_NAME VARCHAR
SQL_TRACE VARCHAR
SQL_TRACE_WAITS VARCHAR
SQL_TRACE_BINDS VARCHAR
SQL> desc v$session_wait
Name Null? Type
SID NUMBER
SEQ# NUMBER
EVENT VARCHAR
P
P
P
P
P
P
P
P
P
WAIT_CLASS_ID NUMBER
WAIT_CLASS# NUMBER
WAIT_CLASS VARCHAR
WAIT_TIME NUMBER
SECONDS_IN_WAIT NUMBER
STATE VARCHAR
SQL>
From:http://tw.wingwit.com/Article/program/Oracle/201311/18472.html