[20200420]V$SES_OPTIMIZER_ENV 查不到剛修改的隱含引數.txt
[20200420]V$SES_OPTIMIZER_ENV 查不到剛修改的隱含引數.txt
--//連結http://www.itpub.net/thread-2133210-1-1.html的問題:
ORACLE 11204,
1 在sqlplus裡執行語句:alter session set "_add_col_optim_enabled" = false;
2 然後找出該程式的SID: select sid from v$mystat group by sid;
3 之後再查詢 select name from v$ses_optimizer_env where sid=xxx:上面查詢的sid值,
但查詢結果裡,沒有看到 "_add_col_optim_enabled" 這個隱含引數,WHY ?
--//在自己的測試環境重複測試:
1.環境:
SCOTT@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SYS@book> @ hide _add_col_optim_enabled
NAME DESCRIPTION DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE ISSES ISSYS_MOD
---------------------- ---------------------------------- ------------- ------------- ------------ ----- ---------
_add_col_optim_enabled Allows new add column optimization TRUE TRUE TRUE TRUE IMMEDIATE
--//預設為true。
2.測試:
--//session 1:
SCOTT@book> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
15 1425 12506 DEDICATED 12507 25 253 alter system kill session '15,1425' immediate;
SCOTT@book> alter session set "_add_col_optim_enabled" = false;
Session altered.
SCOTT@book> show parameter _add_col_optim_enabled
NAME TYPE VALUE
---------------------- ------- -----
_add_col_optim_enabled boolean FALSE
--//session 1:
SYS@book> select name from v$ses_optimizer_env where sid=15 and name like '%add_col_optim_enabled%';
no rows selected
--//確實沒有看到。
3.使用oradebug檢視:
--//session 2:
SYS@book> oradebug setospid 12507
Oracle pid: 25, Unix process pid: 12507, image: oracle@gxqqqdg4 (TNS V1-V3)
SYS@book> oradebug dump modified_parameters 1
Statement processed.
SYS@book> oradebug tracefile_name
/u01/app/oracle/diag/rdbms/book/book/trace/book_ora_12507.trc
--//檢查轉儲:
*** 2020-04-20 11:17:05.571
Received ORADEBUG command (#2) 'dump modified_parameters 1' from process 'Unix process pid: 12516, image: <none>'
DYNAMICALLY MODIFIED PARAMETERS:
nls_language = AMERICAN
nls_territory = AMERICA
nls_sort = BINARY
nls_date_language = AMERICAN
nls_date_format = YYYY-MM-DD HH24:MI:SS
nls_currency = $
nls_numeric_characters = .,
nls_iso_currency = AMERICA
nls_calendar = GREGORIAN
nls_time_format = HH.MI.SSXFF AM
nls_timestamp_format = YYYY-MM-DD HH24:MI:SS.FF
nls_time_tz_format = HH.MI.SSXFF AM TZR
nls_timestamp_tz_format = YYYY-MM-DD HH24:MI:SS.FF TZH:TZM
nls_dual_currency = $
nls_comp = BINARY
_add_col_optim_enabled = FALSE
~~~~~~~~~~~~~~~~~~~~~~~~
4.繼續測試:
--//session 1:
SCOTT@book> alter session set optimizer_index_cost_adj=10;
Session altered.
--//session 2:
SYS@book> select * from v$ses_optimizer_env where sid=15 and lower(name) like '%optimizer_index_cost_adj%';
SID ID NAME SQL_FEATURE ISD VALUE
--- -- ------------------------ ----------- --- -----
15 66 optimizer_index_cost_adj QKSFM_CBO NO 10
SYS@book> oradebug dump modified_parameters 1
Statement processed.
--//檢查轉儲:
*** 2020-04-20 11:22:11.711
Received ORADEBUG command (#4) 'dump modified_parameters 1' from process 'Unix process pid: 12516, image: <none>'
DYNAMICALLY MODIFIED PARAMETERS:
nls_language = AMERICAN
nls_territory = AMERICA
nls_sort = BINARY
nls_date_language = AMERICAN
nls_date_format = YYYY-MM-DD HH24:MI:SS
nls_currency = $
nls_numeric_characters = .,
nls_iso_currency = AMERICA
nls_calendar = GREGORIAN
nls_time_format = HH.MI.SSXFF AM
nls_timestamp_format = YYYY-MM-DD HH24:MI:SS.FF
nls_time_tz_format = HH.MI.SSXFF AM TZR
nls_timestamp_tz_format = YYYY-MM-DD HH24:MI:SS.FF TZH:TZM
nls_dual_currency = $
nls_comp = BINARY
optimizer_index_cost_adj = 10
_add_col_optim_enabled = FALSE
5.繼續測試:
--//按照ZALBB的說法,其它隱含引數是可以查詢到.繼續測試看看:
--//session 1:
SCOTT@book> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
15 2315 17879 DEDICATED 17880 25 59 alter system kill session '15,2315' immediate;
SCOTT@book> alter session set "_optim_peek_user_binds"=false ;
Session altered.
SCOTT@book> show parameter _optim_peek_user_binds
NAME TYPE VALUE
---------------------- ------- ------
_optim_peek_user_binds boolean FALSE
--//session 2:
SYS@book> select * from v$ses_optimizer_env where sid=15 and lower(name) like '%optim_peek_user_binds%';
SID ID NAME SQL_FEATURE ISD VALUE
---- --- ---------------------- ----------- --- ------
15 98 _optim_peek_user_binds QKSFM_CBO NO false
--//session 1:
SCOTT@book> alter session set "_add_col_optim_enabled"=false ;
Session altered.
--//session 2:
SYS@book> select * from v$ses_optimizer_env where sid=15 and lower(name) like '%add_col_optim_enabled%';
no rows selected
--//確實有點奇怪,這個引數_add_col_optim_enabled無法看到。看來比較保險就是使用
SYS@book> oradebug setospid 17880
Oracle pid: 25, Unix process pid: 17880, image: oracle@gxqqqdg4 (TNS V1-V3)
SYS@book> oradebug dump modified_parameters 1
Statement processed.
SYS@book> oradebug tracefile_name
/u01/app/oracle/diag/rdbms/book/book/trace/book_ora_17880.trc
--//檢查轉儲:
Received ORADEBUG command (#1) 'dump modified_parameters 1' from process 'Unix process pid: 12516, image: <none>'
DYNAMICALLY MODIFIED PARAMETERS:
nls_language = AMERICAN
nls_territory = AMERICA
nls_sort = BINARY
nls_date_language = AMERICAN
nls_date_format = YYYY-MM-DD HH24:MI:SS
nls_currency = $
nls_numeric_characters = .,
nls_iso_currency = AMERICA
nls_calendar = GREGORIAN
nls_time_format = HH.MI.SSXFF AM
nls_timestamp_format = YYYY-MM-DD HH24:MI:SS.FF
nls_time_tz_format = HH.MI.SSXFF AM TZR
nls_timestamp_tz_format = YYYY-MM-DD HH24:MI:SS.FF TZH:TZM
nls_dual_currency = $
nls_comp = BINARY
_optim_peek_user_binds = FALSE
_add_col_optim_enabled = FALSE
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2687295/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20190417]隱含引數_SPIN_COUNT.txt
- [20190401]隱含引數_mutex_spin_count.txtMutex
- [20191206]隱含引數_db_always_check_system_ts.txt
- v$parameter gv$parameter 檢視 DDL 與隱含引數
- [20220913]hugepage相關引數含義.txt
- [20191204]hugepage相關引數含義.txt
- 常用指令碼:獲取隱含引數指令碼
- [20210209]修改CPU_COUNT引數.txt
- Oracle direct path read相關隱含引數Oracle
- 【PARANETERS】Oracle異常恢復相關的隱含引數Oracle
- 使用隱含引數testMappingSpeed排查GoldenGate抽取慢的步驟APPGo
- [20210209]修改CPU_COUNT引數2.txt
- Oracle 11G 隱含引數“_controlfile_autobackup_delay”Oracle
- [20190523]修改引數後一些細節注意.txt
- 日誌損壞時,加入隱含引數開啟資料庫的總結資料庫
- [20190523]修改引數後一些細節注意2.txt
- php引數3個點的含義PHP
- [20180413]bash 位置引數.txt
- Python中key引數的含義及用法Python
- Python 中 key 引數的含義及用法Python
- histb 引導核心 boot_cmd 引數含義boot
- SpringDataJpa列印Sql詳情(含引數)SpringSQL
- linux修改系統引數Linux
- [20200620]expdp impdp exclude引數.txt
- Charles 修改請求(Request)引數
- RAC 修改引數DB_FILES
- 使用js修改url地址引數JS
- Windows 下修改Tomcat jvm引數WindowsTomcatJVM
- [20210826]核心引數kernel.sem.txt
- [20190917]oracle引數deferred屬性.txtOracle
- [20200620]IMPDP TRANSFORM引數再探究.txtORM
- [20200220]windows設定keepalive引數.txtWindows
- SAP Fiori 應用 url 中的 DraftUUID 引數的含義RaftUI
- 不重啟mysql情況修改引數變數MySql變數
- Oracle RAC修改引數檔案位置Oracle
- 含兩個引數的三元函式的高階偏導數函式
- [20210310]db_lost_write_protect引數.txt
- [20190409]latch get 引數where and why.txt