常用指令碼:獲取隱含引數
指令碼涉及:gethidpar.sql 獲取隱含引數
gettrcname.sql 獲取當前trace檔名稱
getplan.sql 獲取sql語句的執行計劃,透過v$sql_plan檢視。
gettrcname.sql 獲取當前trace檔名稱
getplan.sql 獲取sql語句的執行計劃,透過v$sql_plan檢視。
gethidpar.sql內容如下:
set linesize 120
col name for a30
col value for a20
col describ for a60
col name for a30
col value for a20
col describ for a60
select x.ksppinm name, y.ksppstvl value, x.ksppdesc describ
from sys.x$ksppi x,sys.x$ksppcv y
where x.indx = y.indx
and x.ksppinm like '%&par%'
from sys.x$ksppi x,sys.x$ksppcv y
where x.indx = y.indx
and x.ksppinm like '%&par%'
/
gettrcname.sql 內容如下:
select
a.value || b.symbol || c.instance_name || '_ora_' || d.spid || '.trc' trace_file_name
from (select value from v$parameter where name = 'user_dump_dest')a,
(select substr(value,-6,1) symbol from v$parameter where name = 'user_dump_dest') b,
(select instance_name from v$instance) c,
(select spid from v$session s,v$process p,v$mystat m where s.paddr = p.addr and s.sid = m.sid and m.statistic#=0) d
select
a.value || b.symbol || c.instance_name || '_ora_' || d.spid || '.trc' trace_file_name
from (select value from v$parameter where name = 'user_dump_dest')a,
(select substr(value,-6,1) symbol from v$parameter where name = 'user_dump_dest') b,
(select instance_name from v$instance) c,
(select spid from v$session s,v$process p,v$mystat m where s.paddr = p.addr and s.sid = m.sid and m.statistic#=0) d
/
getplan.sql 內容如下:
set linesize 120
col operation format a55
col cost format 99999
col kbytes format 999999
col object format a25
set linesize 120
col operation format a55
col cost format 99999
col kbytes format 999999
col object format a25
select hash_value,child_number,
lpad(' ',2*depth) || operation || ' ' || options || decode(id,0,substr(optimizer,1,6) || 'Cost=' || to_char(cost)) operation,
object_name object,
cost,
round(bytes/1024) kbytes
from v$sql_plan
where hash_value in (
select a.sql_hash_value from v$session a,v$session_wait b
where a.sid = b.sid and b.event = '&waitevent')
order by hash_value,child_number,id;
/
lpad(' ',2*depth) || operation || ' ' || options || decode(id,0,substr(optimizer,1,6) || 'Cost=' || to_char(cost)) operation,
object_name object,
cost,
round(bytes/1024) kbytes
from v$sql_plan
where hash_value in (
select a.sql_hash_value from v$session a,v$session_wait b
where a.sid = b.sid and b.event = '&waitevent')
order by hash_value,child_number,id;
/
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/2317695/viewspace-2152964/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle獲取隱含引數Oracle
- 獲取Oracle隱含引數資訊Oracle
- 獲取oracle的隱含引數Oracle
- oracle 檢視隱含引數指令碼Oracle指令碼
- 獲取_字首的oracle hidden parameter隱含引數Oracle
- oracle 11g常用隱含引數Oracle
- 常用操作 / 獲取引數
- 【指令碼】隱含引數及註釋資訊的查詢方法指令碼
- Oracle 隱含引數Oracle
- ORACLE隱含引數Oracle
- [20171109]檢視隱含引數指令碼.txt指令碼
- Oracle隱形引數查詢指令碼Oracle指令碼
- 隱含引數的查詢
- Oracle的隱含引數(zt)Oracle
- shell指令碼中main函式中$#獲取不到指令碼傳入引數個數淺析指令碼AI函式
- 獲取資料庫中所有隱藏引數資料庫
- Shell指令碼對ps命令隱藏引數指令碼
- oracle的一個隱含引數Oracle
- Oracle 中所有隱含的 引數Oracle
- Oracle隱含引數的查詢Oracle
- Python指令碼的常見引數獲取和處理方式Python指令碼
- TCL指令碼讀取命令列引數指令碼命令列
- 探究隱含引數_fairness_thresholdAI
- [zt] 如何檢視Oracle 隱含引數Oracle
- Nginx常用配置引數的含義Nginx
- oracle隱含引數的檢視與修改Oracle
- 【parameter】oracle的隱含引數的檢視Oracle
- Oracle 隱含引數 : _allow_resetlogs_corruptionOracle
- maven的指令及常用引數Maven
- javascript獲取url引數程式碼例項JavaScript
- 檢視資料庫中的隱藏引數(指令碼)資料庫指令碼
- JavaScript—獲取引數(23)JavaScript
- js獲取url引數JS
- jquery獲取url引數jQuery
- Oracle direct path read相關隱含引數Oracle
- Oracle 隱含引數 _disable_loggingOracle
- 隱含引數的查詢x$ksppi,x$ksppcv
- 【ASM學習】關於 ASM 的隱含引數ASM