v$session的解釋
在本檢視中,每一個連線到資料庫例項中的session都擁有一條記錄。包括使用者session及後臺程式如DBWR,LGWR,arcchiver等等。
V$SESSION 中的常用列
V$SESSION 是基礎資訊檢視,用於找尋使用者SID或SADDR。不過,它也有一些列會動態的變化,可用於檢查使用者。如例:
欄位解釋:
欄位1:SARRD: raw(4):Session Address,session的地址
欄位2:SID:RAW(4):Session Identifier,session的識別符號
欄位3:SERIAL# :NUMBER:
Session serial number,Session的序列號。 Used to identify uniquely 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
如果某個SID又被其它的session使用的話則此數值自增加(當一個 SESSION 結束,另一個SESSION開始並使用了同一個SID)。
欄位4:AUDSID:number:Auditing session ID
審查session ID唯一性,確認它通常也用於當尋找並行查詢模式。
欄位5:PARRD:RAW(4):Address of the process that owns this session
這個session擁有的程式地址
欄位6:USER#:number:Oracle user identified
Oracle使用者的識別符號
欄位7:USERNAME:varchar2(30):Oracle username,Oracle的使用者名稱
欄位8:COMMAND:number:
Command in progress (last statement parsed); for a list of values, see Table 3-7
該session 的命令所對應的sql對應數字值:預設為0
欄位8:OWNERID :NUMBER
The column contents are invalid if the value is 2147483644. Otherwise, this column contains the identifier of the user who owns the migratable session
For operations using Parallel Slaves, interpret this value as a 4Byte value. The low-order 2Bytes of which represent the session number, and the high-order bytes the instance ID of the query coordinator
欄位9:TADDR:VARCHAR2(8) :Address of transaction state object
事務狀態物件的地址
欄位10:LOCKWAIT :VARCHAR2(8)
Address of lock waiting for; NULL if none
鎖等待的地址,如果為空的話則沒有等待
欄位11:STATUS :VARCHAR2(8)
Status of the session: ACTIVE (currently executing ), INACTIVE, KILLED (marked to be killed), CACHED (temporarily cached for use by Oracle*XA), SNIPED (session inactive, waiting on the client)
這列用來判斷session狀態是:
Active :活動狀態,正執行SQL語句
Inactive :不活動狀態
Killed :被標註為刪除
Cached:Oracle中的臨時緩衝區使用
SNIPED:session不活動,等待客戶端操作
欄位12:SERVER :VARCHAR2(9)
Server type: DEDICATED, SHARED, PSEUDO, NONE
使用連線資料庫伺服器的型別
DEDICATED:專用伺服器
SHARED:共享伺服器
PSEUDO:
NONE:
欄位13:SCHEMA# :NUMBER :
Schema user identifier
Schema 使用者識別符號所對應的數字值
欄位14:SCHEMANAME :VARCHAR2(30) :
Schema user name
Schema的使用者名稱
欄位15:OSUSER :VARCHAR2(15)
Operating system client user name
客戶端作業系統的使用者名稱
欄位16:PROCESS
VARCHAR2(9)
Operating system client process ID
客戶端作業系統的程式ID(識別符號)
欄位17:MACHINE
VARCHAR2(64)
Operating system machine name
連線資料庫的客戶端作業系統的機器名稱
欄位18:TERMINAL
VARCHAR2(10)
Operating system terminal name
連線資料庫的客戶端作業系統的終端名稱
欄位19:PROGRAM
VARCHAR2(48)
Operating system program name
連線資料庫的客戶端作業系統的程式名稱
欄位20:TYPE
VARCHAR2(10)
Session type
Session的型別
欄位21:SQL_ADDRESS
RAW(4)
Used with SQL_HASH_VALUE to identify the SQL statement that is currently being executed
當前正在執行的SQL語句的SQL_HASH_VALUE值
欄位22:SQL_HASH_VALUE
NUMBER
Used with SQL_ADDRESS to identify the SQL statement that is currently being executed
當前正在執行的SQL語句的SQL_ADDRESS值
SQL_HASH_VALUE ,SQL_ADDRESS:這兩列用於鑑別預設被session執行的SQL語句。如果為null或0,那就說明這個session沒有執行任何SQL語句。PREV_HASH_VALUE和PREV_ADDRESS兩列用來鑑別被session執行的上一條語句。
欄位23:SQL_ID
VARCHAR2(13)
SQL identifier of the SQL statement that is currently being executed
正在執行的SQL語句的識別符號
欄位24:SQL_CHILD_NUMBER
number
Child number of the SQL statement that is currently being executed
欄位25:PREV_SQL_ADDR
raw(4)
Used with PREV_HASH_VALUE to identify the last SQL statement executed
欄位26:PREV_HASH_VALUE
Number
Used with SQL_HASH_VALUE to identify the last SQL statement executed
欄位27:PREV_SQL_ID
Varchar2(13)
SQL identifier of the last SQL statement executed
Table 7-5 COMMAND Column of V$SESSION and Corresponding Commands
Number | Command | Number | Command |
---|---|---|---|
1 |
CREATE TABLE |
2 |
INSERT |
3 |
SELECT |
4 |
CREATE CLUSTER |
5 |
ALTER CLUSTER |
6 |
UPDATE |
7 |
DELETE |
8 |
DROP CLUSTER |
9 |
CREATE INDEX |
10 |
DROP INDEX |
11 |
ALTER INDEX |
12 |
DROP TABLE |
13 |
CREATE SEQUENCE |
14 |
ALTER SEQUENCE |
15 |
ALTER TABLE |
16 |
DROP SEQUENCE |
17 |
GRANT OBJECT |
18 |
REVOKE OBJECT |
19 |
CREATE SYNONYM |
20 |
DROP SYNONYM |
21 |
CREATE VIEW |
22 |
DROP VIEW |
23 |
VALIDATE INDEX |
24 |
CREATE PROCEDURE |
25 |
ALTER PROCEDURE |
26 |
LOCK |
27 |
NO-OP |
28 |
RENAME |
29 |
COMMENT |
30 |
AUDIT OBJECT |
31 |
NOAUDIT OBJECT |
32 |
CREATE DATABASE LINK |
33 |
DROP DATABASE LINK |
34 |
CREATE DATABASE |
35 |
ALTER DATABASE |
36 |
CREATE ROLLBACK SEG |
37 |
ALTER ROLLBACK SEG |
38 |
DROP ROLLBACK SEG |
39 |
CREATE TABLESPACE |
40 |
ALTER TABLESPACE |
41 |
DROP TABLESPACE |
42 |
ALTER SESSION |
43 |
ALTER USER |
44 |
COMMIT |
45 |
ROLLBACK |
46 |
SAVEPOINT |
47 |
PL/SQL EXECUTE |
48 |
SET TRANSACTION |
49 |
ALTER SYSTEM |
50 |
EXPLAIN |
51 |
CREATE USER |
52 |
CREATE ROLE |
53 |
DROP USER |
54 |
DROP ROLE |
55 |
SET ROLE |
56 |
CREATE SCHEMA |
57 |
CREATE CONTROL FILE |
59 |
CREATE TRIGGER |
60 |
ALTER TRIGGER |
61 |
DROP TRIGGER |
62 |
ANALYZE TABLE |
63 |
ANALYZE INDEX |
64 |
ANALYZE CLUSTER |
65 |
CREATE PROFILE |
66 |
DROP PROFILE |
67 |
ALTER PROFILE |
68 |
DROP PROCEDURE |
70 |
ALTER RESOURCE COST |
71 |
CREATE MATERIALIZED VIEW LOG |
72 |
ALTER MATERIALIZED VIEW LOG |
73 |
DROP MATERIALIZED VIEW LOG |
74 |
CREATE MATERIALIZED VIEW |
75 |
ALTER MATERIALIZED VIEW |
76 |
DROP MATERIALIZED VIEW |
77 |
CREATE TYPE |
78 |
DROP TYPE |
79 |
ALTER ROLE |
80 |
ALTER TYPE |
81 |
CREATE TYPE BODY |
82 |
ALTER TYPE BODY |
83 |
DROP TYPE BODY |
84 |
DROP LIBRARY |
85 |
TRUNCATE TABLE |
86 |
TRUNCATE CLUSTER |
91 |
CREATE FUNCTION |
92 |
ALTER FUNCTION |
93 |
DROP FUNCTION |
94 |
CREATE PACKAGE |
95 |
ALTER PACKAGE |
96 |
DROP PACKAGE |
97 |
CREATE PACKAGE BODY |
98 |
ALTER PACKAGE BODY |
99 |
DROP PACKAGE BODY |
100 |
LOGON |
101 |
LOGOFF |
102 |
LOGOFF BY CLEANUP |
103 |
SESSION REC |
104 |
SYSTEM AUDIT |
105 |
SYSTEM NOAUDIT |
106 |
AUDIT DEFAULT |
107 |
NOAUDIT DEFAULT |
108 |
SYSTEM GRANT |
109 |
SYSTEM REVOKE |
110 |
CREATE PUBLIC SYNONYM |
111 |
DROP PUBLIC SYNONYM |
112 |
CREATE PUBLIC DATABASE LINK |
113 |
DROP PUBLIC DATABASE LINK |
114 |
GRANT ROLE |
115 |
REVOKE ROLE |
116 |
EXECUTE PROCEDURE |
117 |
USER COMMENT |
118 |
ENABLE TRIGGER |
119 |
DISABLE TRIGGER |
120 |
ENABLE ALL TRIGGERS |
121 |
DISABLE ALL TRIGGERS |
122 |
NETWORK ERROR |
123 |
EXECUTE TYPE |
157 |
CREATE DIRECTORY |
158 |
DROP DIRECTORY |
159 |
CREATE LIBRARY |
160 |
CREATE JAVA |
161 |
ALTER JAVA |
162 |
DROP JAVA |
163 |
CREATE OPERATOR |
164 |
CREATE INDEXTYPE |
165 |
DROP INDEXTYPE |
167 |
DROP OPERATOR |
168 |
ASSOCIATE STATISTICS |
169 |
DISASSOCIATE STATISTICS |
170 |
CALL METHOD |
171 |
CREATE SUMMARY |
172 |
ALTER SUMMARY |
173 |
DROP SUMMARY |
174 |
CREATE DIMENSION |
175 |
ALTER DIMENSION |
176 |
DROP DIMENSION |
177 |
CREATE CONTEXT |
178 |
DROP CONTEXT |
179 |
ALTER OUTLINE |
180 |
CREATE OUTLINE |
181 |
DROP OUTLINE |
182 |
UPDATE INDEXES |
183 |
ALTER OPERATOR |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12778571/viewspace-588832/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- v$process和v$session中欄位解釋Session
- v$Session詳解Session
- 【Oracle】-【v$session】v$session的SNIPED狀態OracleSession
- keycloak~關於session idle和session max的解釋Session
- V$SESSIONSession
- 【SESSION】v$session and v$license 中sessions_current 的區別Session
- cookie與session的自己思考與解釋CookieSession
- v$session的來源Session
- v$session中的serverSessionServer
- v$session表的妙用Session
- V$session 表的妙用Session
- v$session的blocking_session含義SessionBloC
- session和v$session說明Session
- v session_wait v session_event v system_eventSessionAI
- v$session_event , v$system_event , v$session_waitSessionAI
- [轉] V$session 表的妙用Session
- V$session 表的妙用^_^(轉)Session
- v$session_wait和v$session_event檢視SessionAI
- V$SESSION記錄的BLOCKING_SESSION錯誤SessionBloC
- 10.17 V$SESSIONSession
- V$SESSION COMMANDSession
- v$session 檢視Session
- Oracle V$SESSION中的常用列OracleSession
- v$session command 的含義Session
- V$SESSION的SID&SERIAL#Session
- v$session的一點認知Session
- 引數session_cached_cursors的詳細解釋(zt)Session
- 關於v$process與v$session中process的理解Session
- 幾個檢視 v$mystat v$systata v$sessionSession
- v$action_session_historySession
- V$SESSION_LONGOPSSessionGo
- V$SESSION_WAITSessionAI
- 10G V$SESSIONSession
- 幾個重要檢視(V$SYSTEM_EVENT V$SESSION_EVENT V$SESSION_WAIT)SessionAI
- kill session V$SESSION標記為KILLED 的2種情況Session
- 11g v$session的新增列Session
- V$session 檢視的小運用Session
- v$lock.type中的內容解釋