[20220228]測試Max_idle_blocker_time 引數.txt
[20220228]測試Max_idle_blocker_time 引數.txt
--//今天本來想測試Max_idle_blocker_time在19c的情況,發現不起作用,我使用sys使用者測試,我估計可能對於sys使用者這樣的設定可能不
--//起作用.我又做了max_idle_time的測試發現問題依舊,我沒有19c的測試環境,先在18c上測試Max_idle_blocker_time的情況.
1.環境:
SYS@xxx.xxx.x.x:1521/orclcdb> @ prxx
==============================
PORT_STRING : x86_64/Linux 2.4.xx
VERSION : 18.0.0.0.0
BANNER : Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
BANNER_FULL : Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
BANNER_LEGACY : Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
CON_ID : 0
PL/SQL procedure successfully completed.
SYS@xxx.xxx.x.x:1521/orclcdb> alter system set max_idle_time=1 scope=memory;
System altered.
--//1分鐘.
2.登入普通使用者的PDB會話測試:
--//session 1:
TTT@xxx.xxx.x.x:1521/orcl> show parameter max_idle_
PARAMETER_NAME TYPE VALUE
-------------- ------- -----
max_idle_time integer 1
TTT@xxx.xxx.x.x:1521/orcl> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---- ---------- ------- --------- ------ ------- ---------- --------------------------------------------------
45 63449 54371 DEDICATED 15672 48 298944 alter system kill session '45,63449' immediate;
--//記下sid=45.
TTT@xxx.xxx.x.x:1521/orcl> host sleep 122
TTT@xxx.xxx.x.x:1521/orcl> show parameter max_idle_
ORA-03113: end-of-file on communication channel
Process ID: 15071
Session ID: 280 Serial number: 37330
--//我以前的測試必須等待2*max_idle_time時間。而不是max_idle_time.
--//重新登陸,我的測試環境就我一個人使用,一般情況下sid依舊等於45.
--//session 1:
SYS@xxx.xxx.x.x:1521/orcl> select sysdate from dual;
SYSDATE
-------------------
2022-02-28 15:21:53
--//session 2:
TTT@xxx.xxx.x.x:1521/orcl> select SECONDS_IN_WAIT,event from v$session where sid=45 ;
SECONDS_IN_WAIT EVENT
--------------- ---------------------------
97 SQL*Net message from client
TTT@xxx.xxx.x.x:1521/orcl> select SECONDS_IN_WAIT,event from v$session where sid=45 ;
SECONDS_IN_WAIT EVENT
--------------- ----------------------------------------
122 SQL*Net message from client
TTT@xxx.xxx.x.x:1521/orcl> @ sid 45
sid = 45
SPID PID SID SERIAL# CLIENT_INFO PNAME TRACEFILE PROGRAM TERMINAL SQL_ID STATUS C50
------ ------- ---------- ---------- -------------------- ------ ---------------------------------------------------------------------------- ---------------------------------------- ------------ -------------------------- ---------------- --------------------------------------------------
15672 48 45 63449 /u01/app/oracle/diag/rdbms/orclcdb/orclcdb/trace/orclcdb_ora_15672.trc sqlplus@gxqyydg4 (TNS V1-V3) pts/2 INACTIVE alter system kill session '45,63449' immediate;
--//過去122秒,程式還在.視乎總是多一點點,不知道具體演算法,我估計一段時間輪詢。
TTT@xxx.xxx.x.x:1521/orcl> @ sid 45
sid = 45
no rows selected
--//sid=45消失.
--//回到會話執行:
--//session 1:
TTT@xxx.xxx.x.x:1521/orcl> select sysdate from dual;
ERROR:
ORA-03114: not connected to ORACLE
--//已經kill 。
--//如果是sys使用者登入呢?
--//session 1:
SYS@xxx.xxx.x.x:1521/orcl> show user
USER is "SYS"
--//當前時sys使用者.
SYS@xxx.xxx.x.x:1521/orcl> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---- ---------- ------- ------------------ ------ ------- ---------- --------------------------------------------------
38 37824 54481 DEDICATED 17224 64 132996 alter system kill session '38,37824' immediate;
--//開啟另外會話:
--//session 2:
TTT@xxx.xxx.x.x:1521/orcl> select SECONDS_IN_WAIT,event from v$session where sid=38 ;
SECONDS_IN_WAIT EVENT
--------------- ----------------------------------------
133 SQL*Net message from client
--//回到原來會話:
--//session 1:
SYS@xxx.xxx.x.x:1521/orcl> select sysdate from dual;
SYSDATE
-------------------
2022-02-28 17:22:53
--//可以發現對於sys使用者該引數max_idle_time無效。
3.換一種方式測試:
--//session 1:
TTT@xxx.xxx.x.x:1521/orcl> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
--- ---------- ------- ------------------ ------ ------- ---------- --------------------------------------------------
291 35911 59525 DEDICATED 18855 62 30182 alter system kill session '291,35911' immediate;
--//session 2:
$ seq 200 | xargs -IQ echo -e 'set head off verify off \nselect SECONDS_IN_WAIT,SERIAL#,event from v$session where sid=&1 ;\nhost sleep 1\n'| sqlplus -s -l ttt/oracle@xxx.xxx.x.x:1521/orcl @ ver1 291
172 SQL*Net message from client
no rows selected
151 44251 SQL*Net message from client
no rows selected
144 33075 SQL*Net message from client
no rows selected
154 5619 SQL*Net message from client
no rows selected
137 45124 SQL*Net message from client
no rows selected
169 46894 SQL*Net message from client
no rows selected
--//可以發現並不是max_idle_time*2.
--//我設定alter system set max_idle_time=3 scope=memory;重複測試僅僅記錄結果。
298 265 SQL*Net message from client
298 265 SQL*Net message from client
294 29591 SQL*Net message from client
244 44065 SQL*Net message from client
259 38284 SQL*Net message from client
--//不知道為什麼僅僅做一個記錄吧。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2861722/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20180308]測試ARG_MAX引數.txt
- [20190409]latch get 引數where and why測試.txt
- 【PARAMETER】Oracle引數:MAX_IDLE_BLOCKER_TIME 解釋OracleBloC
- 介面測試 - 引數測試
- 介面測試-引數校驗
- Oracle JDBC ResultSet引數測試OracleJDBC
- [20180413]bash 位置引數.txt
- [20210528]Oracle 19c Max_Idle_Blocker_Time Parameter.txtOracleBloC
- .net持續整合測試篇之Nunit引數化測試
- 滲透測試學習之報告測試引數五
- Jmeter模板化引數併發測試JMeter
- [20200620]expdp impdp exclude引數.txt
- 介面測試並不只是測試引數和返回值
- 記學習滲透測試之報告測試引數二
- 記學習滲透測試之報告測試引數一
- 記學習滲透測試之報告測試引數四
- 記學習滲透測試之報告測試引數三
- [20181219]測試設定引數filesystemio_options與開啟資料檔案的flag.txt
- pytest介面測試之fixture傳引數request
- Python測試框架pytest命令列引數用法Python框架命令列
- JSR規範,系統引數測試大全JS
- [20210826]核心引數kernel.sem.txt
- [20190917]oracle引數deferred屬性.txtOracle
- [20200620]IMPDP TRANSFORM引數再探究.txtORM
- [20200220]windows設定keepalive引數.txtWindows
- [20210209]修改CPU_COUNT引數.txt
- 【測試】Android Studio 相關下載及引數Android
- ab壓力測試命令及引數詳解
- 介面測試--獲取動態引數進階
- MySQL 5.6 innodb_io_capacity引數效能測試MySql
- [20220913]hugepage相關引數含義.txt
- [20191204]hugepage相關引數含義.txt
- [20190417]隱含引數_SPIN_COUNT.txt
- [20210310]db_lost_write_protect引數.txt
- [20190409]latch get 引數where and why.txt
- OTDR光時域反射儀測試引數設定反射
- [20220531]測試quiz night.txtUI
- [20211231]函式索引測試.txt函式索引