【遞迴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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- sql server遞迴SQLServer遞迴
- SQL 遞迴思想SQL遞迴
- oracle v$sqlare 分析SQL語句使用資源情況OracleSQL
- SQL中的遞迴用法SQL遞迴
- kingbase SQL最佳化案例 ( union遞迴 改 cte遞迴 )SQL遞迴
- 遞迴-第X大的數遞迴
- 最新情報:所有的遞迴都可以改寫成非遞迴?遞迴
- Oracle RAC中驗證LUN_ID對應情況Oracle
- DOM對映的特殊情況
- 10個SQL技巧之二:使用遞迴SQL生成資料SQL遞迴
- 觸發JVM進行Full GC的情況及應對策略JVMGC
- 遞迴和尾遞迴遞迴
- 快速排序【遞迴】【非遞迴】排序遞迴
- SQL Server2005使用CTE實現遞迴QCSQLServer遞迴
- ash報告中無sql_id的情況SQL
- SQL中除數為0處理情況演示SQL
- 我對遞迴的理解和總結遞迴
- 遞迴遞迴
- 遊標和遞迴sql 的一些程式碼遞迴SQL
- 月結各模組關閉情況查詢SQLSQL
- X Open Cup named after E.V. Pankratiev. European Grand Prix
- 舉例說明你對尾遞迴的理解,有哪些應用場景遞迴
- 遞迴的應用場景和呼叫機制、遞迴需要遵守的重要規則遞迴
- SpringBoot2.6.x預設禁用迴圈依賴後的應對策略Spring Boot
- 什麼是遞迴?遞迴和迴圈的異同遞迴
- mybatis sql foreach 引數的傳入的三種情況!!MyBatisSQL
- go 遞迴Go遞迴
- JavaScript遞迴JavaScript遞迴
- 分而治之-遞迴遞迴
- 理解遞迴遞迴
- 透過遞迴查詢應用依賴遞迴
- 給妹子講python-S01E12迴圈迭代初體驗Python
- 對遞迴和迭代的效率的思考和分析遞迴
- 遍歷二叉樹-------遞迴&非遞迴二叉樹遞迴
- SQL server資料庫with as子句與遞迴查詢的實現SQLServer資料庫遞迴
- 遞迴和遞推總結遞迴
- 演算法小專欄:遞迴與尾遞迴演算法遞迴
- 迭代與遞迴--你被遞迴搞暈過嗎?遞迴