oracle一個process對應多個session測試
SQL> set linesize 200;
SQL>
SQL>
SQL> select sid,serial#,username from v$session where username='SYS';
SQL>
SQL>
SQL> select sid,serial#,username from v$session where username='SYS';
SID SERIAL# USERNAME
---------- ---------- ------------------------------
109 10403 SYS
---------- ---------- ------------------------------
109 10403 SYS
SQL>
SQL>
SQL> set autotrace on;
SQL>
SQL>
SQL> select sid,serial#,username from v$session where username='SYS';
SQL>
SQL> set autotrace on;
SQL>
SQL>
SQL> select sid,serial#,username from v$session where username='SYS';
SID SERIAL# USERNAME
---------- ---------- ------------------------------
54 760 SYS
109 10403 SYS
---------- ---------- ------------------------------
54 760 SYS
109 10403 SYS
Execution Plan
----------------------------------------------------------
Plan hash value: 3733760267
--------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 108 | 0 (0)| 00:00:01 |
| 1 | NESTED LOOPS | | 1 | 108 | 0 (0)| 00:00:01 |
|* 2 | FIXED TABLE FULL | X$KSUSE | 1 | 95 | 0 (0)| 00:00:01 |
|* 3 | FIXED TABLE FIXED INDEX| X$KSLED (ind:2) | 1 | 13 | 0 (0)| 00:00:01 |
--------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 108 | 0 (0)| 00:00:01 |
| 1 | NESTED LOOPS | | 1 | 108 | 0 (0)| 00:00:01 |
|* 2 | FIXED TABLE FULL | X$KSUSE | 1 | 95 | 0 (0)| 00:00:01 |
|* 3 | FIXED TABLE FIXED INDEX| X$KSLED (ind:2) | 1 | 13 | 0 (0)| 00:00:01 |
--------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
---------------------------------------------------
2 - filter("S"."KSUUDLNA"='SYS' AND "S"."INST_ID"=USERENV('INSTANCE') AND
BITAND("S"."KSSPAFLG",1)<>0 AND BITAND("S"."KSUSEFLG",1)<>0)
3 - filter("S"."KSUSEOPC"="E"."INDX")
BITAND("S"."KSSPAFLG",1)<>0 AND BITAND("S"."KSUSEFLG",1)<>0)
3 - filter("S"."KSUSEOPC"="E"."INDX")
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
710 bytes sent via SQL*Net to client
492 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
2 rows processed
SQL>
SQL> select a.sid,a.username,a.serial#, b.spid,b.pid from v$session a, v$process b where a.paddr=b.addr and a.username='SYS';
SID USERNAME SERIAL# SPID PID
---------- ------------------------------ ---------- ------------ ----------
109 SYS 10403 8344 44
54 SYS 760 8344 44
---------- ------------------------------ ---------- ------------ ----------
109 SYS 10403 8344 44
54 SYS 760 8344 44
Execution Plan
----------------------------------------------------------
Plan hash value: 3145835683
--------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 167 | 1 (100)| 00:00:01 |
| 1 | NESTED LOOPS | | 1 | 167 | 1 (100)| 00:00:01 |
|* 2 | HASH JOIN | | 1 | 154 | 1 (100)| 00:00:01 |
|* 3 | FIXED TABLE FULL | X$KSUSE | 1 | 101 | 0 (0)| 00:00:01 |
|* 4 | FIXED TABLE FULL | X$KSUPR | 1 | 53 | 0 (0)| 00:00:01 |
|* 5 | FIXED TABLE FIXED INDEX| X$KSLED (ind:2) | 1 | 13 | 0 (0)| 00:00:01 |
--------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 167 | 1 (100)| 00:00:01 |
| 1 | NESTED LOOPS | | 1 | 167 | 1 (100)| 00:00:01 |
|* 2 | HASH JOIN | | 1 | 154 | 1 (100)| 00:00:01 |
|* 3 | FIXED TABLE FULL | X$KSUSE | 1 | 101 | 0 (0)| 00:00:01 |
|* 4 | FIXED TABLE FULL | X$KSUPR | 1 | 53 | 0 (0)| 00:00:01 |
|* 5 | FIXED TABLE FIXED INDEX| X$KSLED (ind:2) | 1 | 13 | 0 (0)| 00:00:01 |
--------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
---------------------------------------------------
2 - access("S"."KSUSEPRO"="ADDR")
3 - filter("S"."KSUUDLNA"='SYS' AND "S"."INST_ID"=USERENV('INSTANCE') AND
BITAND("S"."KSSPAFLG",1)<>0 AND BITAND("S"."KSUSEFLG",1)<>0)
4 - filter("INST_ID"=USERENV('INSTANCE') AND BITAND("KSSPAFLG",1)<>0)
5 - filter("S"."KSUSEOPC"="E"."INDX")
3 - filter("S"."KSUUDLNA"='SYS' AND "S"."INST_ID"=USERENV('INSTANCE') AND
BITAND("S"."KSSPAFLG",1)<>0 AND BITAND("S"."KSUSEFLG",1)<>0)
4 - filter("INST_ID"=USERENV('INSTANCE') AND BITAND("KSSPAFLG",1)<>0)
5 - filter("S"."KSUSEOPC"="E"."INDX")
Statistics
----------------------------------------------------------
1 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
841 bytes sent via SQL*Net to client
492 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
2 rows processed
SQL>
在另一視窗,執行 ps -ef |grep 8344 |grep -v grep
就可以看到一個process 對應多個 session了
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28373936/viewspace-1722306/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORACLE SESSION 和 PROCESSOracleSession
- 對於一個 APP 測試和 web 測試應該有哪些成長呢!APPWeb
- Spring-MultiValueMap(一個Key對應多個Value)Spring
- 測試2個oracle session會話同時相同記錄持鎖OracleSession會話
- apache中配置多個IP對應多個網站Apache網站
- 問一下有人試過 Jmeter 共享多個 session 值嗎JMeterSession
- 測試第一個
- 對於多個資料庫表對應一個Model問題的思考資料庫
- Oracle 動態效能表 v$session & v$process各個欄位的說明OracleSession
- 滲透測試工具多個應用場合介紹
- QTP測試多個Windows應用程式的解決方案QTWindows
- oracle session和process的關係OracleSession
- oracle中session跟process的研究OracleSession
- junit執行多個測試類
- Python 字典中一鍵對應多個值Python
- oracle一個例項配置多個listener或多個埠Oracle
- oracle一個別例項配置多個listener或多個埠Oracle
- 修改Oracle process 和 session 的方法--摘OracleSession
- List<實體類>轉換成map 一個鍵對應多個值
- 一個域名可以對應多個IP嗎?如何透過DNS實現?DNS
- 動手開發第一個 Cypress 測試應用
- 多個 Laravel 與 Lumen session 共享LaravelSession
- session測試Session
- 關於oracle session的簡單測試OracleSession
- Oracle進行模擬測試資料的一個例子Oracle
- 一個Session Bean如何去呼叫另外一個Session Bean裡的方法?SessionBean
- 一個測試用例裡面有多套測試資料,如何用 beautifureport 分別對各組測試資料進行統計測試通過與否
- session,connect,processSession
- 自然連線的一個測試
- 在Oracle中session和process的區別(轉)OracleSession
- oracle session和process的關係 .轉自CSDNOracleSession
- Oracle中的Connect、session、process的區別OracleSession
- oracle儲存過程plsql_sp_多個out引數測試語法Oracle儲存過程SQL
- Java Process 阻塞測試總結Java
- 一個有關多域名session的問題,比較棘手Session
- 推薦一個 session 庫Session
- oracle一個listener偵聽多個例項的配置Oracle
- 為什麼資料庫中大量的server process沒有對應的session?資料庫ServerSession