【遞迴SQL】v$session--X$KSUSE s,X$KSLED e對應情況
v$session | x$ksuse |
|
|
|
|
|
|
|
|
|
|
| |||||||||
|
s.inst_id |
| ||||||||
SADDR | s.addr |
| ||||||||
SID | s.indx |
| ||||||||
SERIAL# | s.ksuseser |
| ||||||||
AUDSID | s.ksuudses |
| ||||||||
PADDR | s.ksusepro |
| ||||||||
USER# | s.ksuudlui |
| ||||||||
USERNAME | s.ksuudlna |
| ||||||||
COMMAND | s.ksuudoct |
| ||||||||
OWNERID | s.ksusesow |
| ||||||||
TADDR | decode(s.ksusetrn,hextoraw('00'),null,s.ksusetrn) |
| ||||||||
LOCKWAIT | decode(s.ksqpswat,hextoraw('00'),null,s.ksqpswat) |
| ||||||||
STATUS | decode(bitand(s.ksuseidl,11),1,'ACTIVE',0,decode(bitand(s.ksuseflg,4096),0,'INACTIVE','CACHED'),2,'SNIPED',3,'SNIPED', 'KILLED') |
| ||||||||
SERVER | decode(s.ksspatyp,1,'DEDICATED',2,'SHARED',3,'PSEUDO','NONE') |
| ||||||||
SCHEMA# | s.ksuudsid |
| ||||||||
SCHEMANAME | s.ksuudsna |
| ||||||||
OSUSER | s.ksuseunm |
| ||||||||
PROCESS | s.ksusepid |
| ||||||||
MACHINE | s.ksusemnm |
| ||||||||
TERMINAL | s.ksusetid |
|
| |||||||
PROGRAM | s.ksusepnm |
| ||||||||
TYPE | decode(bitand(s.ksuseflg,19),17,'BACKGROUND',1,'USER',2,'RECURSIVE','?') |
| ||||||||
SQL_ADDRESS | s.ksusesql |
| ||||||||
SQL_HASH_VALUE | s.ksusesqh |
| ||||||||
SQL_ID | s.ksusesqi |
| ||||||||
SQL_CHILD_NUMBER | decode(s.ksusesch, 65535, to_number(null), s.ksusesch) |
| ||||||||
PREV_SQL_ADDR | s.ksusepsq |
| ||||||||
PREV_HASH_VALUE | s.ksusepha |
| ||||||||
PREV_SQL_ID | s.ksusepsi |
| ||||||||
PREV_CHILD_NUMBER | decode(s.ksusepch, 65535, to_number(null), s.ksusepch) |
| ||||||||
PLSQL_ENTRY_OBJECT_ID | decode(s.ksusepeo,0,to_number(null),s.ksusepeo) |
| ||||||||
PLSQL_ENTRY_SUBPROGRAM_ID | decode(s.ksusepeo,0,to_number(null),s.ksusepes) |
| ||||||||
PLSQL_OBJECT_ID | decode(s.ksusepco,0,to_number(null),s.ksusepco) |
| ||||||||
PLSQL_SUBPROGRAM_ID | decode(s.ksusepco,0,to_number(null),s.ksusepcs) |
| ||||||||
MODULE | s.ksuseapp |
| ||||||||
MODULE_HASH | s.ksuseaph |
| ||||||||
ACTION | s.ksuseact |
| ||||||||
ACTION_HASH | s.ksuseach |
| ||||||||
CLIENT_INFO | s.ksusecli |
| ||||||||
FIXED_TABLE_SEQUENCE | s.ksusefix |
| ||||||||
ROW_WAIT_OBJ# | s.ksuseobj |
| ||||||||
ROW_WAIT_FILE# | s.ksusefil |
| ||||||||
ROW_WAIT_BLOCK# | s.ksuseblk |
| ||||||||
ROW_WAIT_ROW# | s.ksuseslt |
| ||||||||
LOGON_TIME | s.ksuseltm |
| ||||||||
LAST_CALL_ET | s.ksusectm |
| ||||||||
PDML_ENABLED | decode(bitand(s.ksusepxopt, 12),0,'NO','YES') |
| ||||||||
FAILOVER_TYPE | decode(s.ksuseft, 2,'SESSION', 4,'SELECT',8,'TRANSACTIONAL','NONE') |
| ||||||||
FAILOVER_METHOD | decode(s.ksusefm,1,'BASIC',2,'PRECONNECT',4,'PREPARSE','NONE') |
| ||||||||
FAILED_OVER | decode(s.ksusefs, 1, 'YES', 'NO') |
| ||||||||
RESOURCE_CONSUMER_GROUP | s.ksusegrp |
| ||||||||
PDML_STATUS | decode(bitand(s.ksusepxopt,4),4,'ENABLED', decode(bitand(s.ksusepxopt,8),8,'FORCED','DISABLED')) |
| ||||||||
PDDL_STATUS | decode(bitand(s.ksusepxopt,2),2,'FORCED',decode(bitand(s.ksusepxopt,1),1,'DISABLED','ENABLED')) |
| ||||||||
PQ_STATUS | decode(bitand(s.ksusepxopt,32),32,'FORCED',decode(bitand(s.ksusepxopt,16),16,'DISABLED','ENABLED')) |
| ||||||||
CURRENT_QUEUE_DURATION | s.ksusecqd |
| ||||||||
CLIENT_IDENTIFIER | s.ksuseclid |
| ||||||||
BLOCKING_SESSION_STATUS | decode(s.ksuseblocker,4294967295,'UNKNOWN', 4294967294 , 'UNKNOWN',4294967293,'UNKNOWN',4294967292,'NO HOLDER', 4294967291,'NOT IN WAIT','VALID') |
| ||||||||
BLOCKING_INSTANCE | decode(s.ksuseblocker, 4294967295,to_number(null),4294967294,to_number(null), 4294967293,to_number(null), 4294967292,to_number(null),4294967291, to_number(null),bitand(s.ksuseblocker, 2147418112)/65536) | |||||||||
BLOCKING_SESSION | decode(s.ksuseblocker, 4294967295,to_number(null),4294967294,to_number(null), 4294967293,to_number(null), 4294967292,to_number(null),4294967291, to_number(null),bitand(s.ksuseblocker,65535)) |
| ||||||||
SEQ# | s.ksuseseq |
| ||||||||
EVENT# | s.ksuseopc |
| ||||||||
EVENT | e.kslednam |
| ||||||||
P1TEXT | e.ksledp1 |
| ||||||||
P1 | s.ksusep1 |
| ||||||||
P1RAW | s.ksusep1r |
| ||||||||
P2TEXT | e.ksledp2 |
| ||||||||
P2 | s.ksusep2 |
| ||||||||
P2RAW | s.ksusep2r |
| ||||||||
P3TEXT | e.ksledp3 |
| ||||||||
P3 | s.ksusep3 |
| ||||||||
P3RAW | s.ksusep3r |
| ||||||||
WAIT_CLASS_ID | e.ksledclassid |
| ||||||||
WAIT_CLASS# | e.ksledclass# |
| ||||||||
WAIT_CLASS | e.ksledclass |
| ||||||||
WAIT_TIME | decode(s.ksusetim,0,0,-1,-1,-2,-2, decode(round(s.ksusetim/10000),0,-1,round(s.ksusetim/10000))) |
| ||||||||
SECONDS_IN_WAIT | s.ksusewtm |
| ||||||||
STATE | decode(s.ksusetim, 0, 'WAITING', -2, 'WAITED UNKNOWN TIME', -1, 'WAITED SHORT TIME', decode(round(s.ksusetim/10000),0,'WAITED SHORT TIME','WAITED KNOWN TIME') |
| ||||||||
SERVICE_NAME | s.ksusesvc |
| ||||||||
SQL_TRACE | decode(bitand(s.ksuseflg2,32),32,'ENABLED','DISABLED') |
| ||||||||
SQL_TRACE_WAITS | decode(bitand(s.ksuseflg2,64),64,'TRUE','FALSE') |
| ||||||||
SQL_TRACE_BINDS | decode(bitand(s.ksuseflg2,128),128,'TRUE','FALSE') |
|
|
|
|
|
|
|
|
|
轉載:http://blog.itpub.net/16976507/viewspace-754440/
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29487349/viewspace-2761741/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- v$session--X$KSUSE s,X$KSLED e欄位對應Session
- 產生遞迴呼叫 (Recursive Call 或 recursive SQL statements) 的幾種情況遞迴SQL
- Python 自用程式碼(遞迴清洗採標情況)Python遞迴
- sql server遞迴SQLServer遞迴
- SQL 遞迴思想SQL遞迴
- oracle v$sqlare 分析SQL語句使用資源情況OracleSQL
- SQL中的遞迴用法SQL遞迴
- SQL Server遞迴查詢SQLServer遞迴
- Oracle遞迴查詢sqlOracle遞迴SQL
- Oracle RAC中驗證LUN_ID對應情況Oracle
- sql無限遞迴查詢SQL遞迴
- sql遞迴查詢子級SQL遞迴
- Oracle SQL的遞迴查詢OracleSQL遞迴
- DOM對映的特殊情況
- kingbase SQL最佳化案例 ( union遞迴 改 cte遞迴 )SQL遞迴
- oracle中的遞迴sql查詢 connect by prior實現遞迴Oracle遞迴SQL
- MS SQL Server的遞迴查詢SQLServer遞迴
- 觸發JVM進行Full GC的情況及應對策略JVMGC
- Eclipse-Eclipse和對應的Jdk版本匹配情況EclipseJDK
- 遞迴和尾遞迴遞迴
- SQL with as 的用法 以及遞迴函式的寫法 遞迴層次查詢SQL遞迴函式
- SQL Server中CTE的另一種遞迴方式-從底層向上遞迴SQLServer遞迴
- 遞迴的簡單應用遞迴
- MS SQL Server的遞迴查詢(2)SQLServer遞迴
- 快速排序【遞迴】【非遞迴】排序遞迴
- [20120414]儲存過程遞迴呼叫與V$SQL.txt儲存過程遞迴SQL
- Go語言對Android原生應用開發的支援情況GoAndroid
- 我對遞迴的理解和總結遞迴
- 我對Postgresql遞迴查詢的理解SQL遞迴
- sql 函式實現三種父子遞迴SQL函式遞迴
- Sql Server 使用CTE實現遞迴查詢SQLServer遞迴
- 10個SQL技巧之二:使用遞迴SQL生成資料SQL遞迴
- 遞迴遞迴
- PHP應避免使用addslashes()的情況PHP
- SQL調優公式T=S/V (zt)SQL公式
- 檢測手機對MMAPI支援的情況API
- ACM(遞迴遞推—A)ACM遞迴
- SQL中除數為0處理情況演示SQL