[20241016]Oracle C functions annotations補充.txt
--//網站orafun.info可以查詢oracle c functions.Created by Frits Hoogland with a little help from Kamil Stawiarski.
--//可以透過它瞭解oracle 內部C 函式.實際上可以直接下載相關檔案,在本地使用.
https://gitlab.com/FritsHoogland/ora_functions/archive/master/ora_functions-master.tar.gz
https://gitlab.com/FritsHoogland/ora_functions
$ ll
total 12828
-rwxrwxr-x. 1 oracle oinstall 1035 2021-01-29 22:06:05 annotate_flamegraph.awk
-rwxrwxr-x. 1 oracle oinstall 2439 2021-01-29 22:06:05 fold_debugtrace.awk
-rw-rw-r--. 1 oracle oinstall 348445 2021-01-29 22:06:05 functions.csv
-rw-r--r--. 1 oracle oinstall 418816 2024-10-16 09:50:45 functions.db
-rwxrwxr-x. 1 oracle oinstall 1630 2021-01-29 22:06:05 lookup.awk
-rwxr-xr-x. 1 oracle oinstall 1660 2024-10-16 09:58:54 lookupx.awk
-rw-rw-r--. 1 oracle oinstall 1679 2021-01-29 22:06:05 readme.md
-rwxrwxr-x. 1 oracle oinstall 3474 2021-01-29 22:06:05 sf.sh
-rw-rw-r--. 1 oracle oinstall 12231272 2021-01-29 22:06:05 symbol_archive_object_19.9.csv
-rw-rw-r--. 1 oracle oinstall 32650 2021-01-29 22:06:05 v_tables_x_tables_mapping.csv
-rw-rw-r--. 1 oracle oinstall 66350 2021-01-29 22:06:05 x_tables_descriptions.csv
--//實際上還有1個sf.sh指令碼,它需要本機安裝sqlite3。
$ grep ^sqlite3 sf.sh
sqlite3 functions.db "drop table if exists functions;"
sqlite3 functions.db "create table functions (function_name varchar(30), function_sum varchar(60));"
sqlite3 functions.db ".import functions.csv functions"
--//手工執行它後可以建立建立匯入表functions。functions.db就是執行指令碼sf.sh後建立的檔案。
--//注意:你執行完1次後,可以註解前面的這3行.
$ ./sf.sh kgllkal
kgllkal -- kernel generic library cache management library cache lock allocate
-------
--//不過顯示與lookup.awk不同。
$ ./lookup.awk -w kglpn
kglpn : kernel generic library cache management pin
kglpnal : kernel generic library cache management pin allocate
kglpnc : kernel generic library cache management pin pin heaps and load data pieces of a cursor object
kglpnck : kernel generic library cache management pin pin heaps and load data pieces of a cursor object check if latch is held
kglpndl : kernel generic library cache management pin delete data heaps
kglpnds : kernel generic library cache management pin delete state object
kglpnmi : kernel generic library cache management pin migration
kglpnp : kernel generic library cache management pin pin heaps and load data for stored procedures
$ ./sf.sh -w kglpn
kglpn pin
kglpnal allocate
kglpnc pin heaps and load data pieces of a cursor object
kglpnck check if latch is held
kglpndl delete data heaps
kglpnds delete state object
kglpnmi migration
kglpnp pin heaps and load data for stored procedures
--//還有2個檔案。
$ ll *table*
-rw-rw-r--. 1 oracle oinstall 32650 2021-01-29 22:06:05 v_tables_x_tables_mapping.csv
-rw-rw-r--. 1 oracle oinstall 66350 2021-01-29 22:06:05 x_tables_descriptions.csv
--//可以直接使用grep查詢:
$ grep -i kglob x_tables_descriptions.csv
X$KGLOB|kernel generic library cache object
X$KGLOBXML|kernel generic library cache object xml (version of x$kglob)
--//oracle 的X表都是大寫。加入-i或者直接大寫。
$ grep -i 'x$kglob' x_tables_descriptions.csv
X$KGLOB|kernel generic library cache object
X$KGLOBXML|kernel generic library cache object xml (version of x$kglob)
--//如果查詢帶有$字元,要加入單引號。
--//也可以修改lookup.awk檔案,修改檔名實現查詢。
$ diff -Nur lookup.awk lookupx.awk
--- lookup.awk 2021-01-29 22:06:05.000000000 +0800
+++ lookupx.awk 2024-10-16 09:58:54.461069120 +0800
@@ -33,14 +33,14 @@
exit 1
}
if ( ARGV[1] == "-w" ) {
- requested_function = ARGV[2];
+ requested_function = toupper(ARGV[2]);
} else {
- requested_function = ARGV[1];
+ requested_function = toupper(ARGV[1]);
}
# load functions from csv into array
PROCINFO["sorted_in"] = "@ind_str_asc";
FS="|";
- while ( ( getline < "functions.csv" ) > 0 ) function_array[$1]=$2;
+ while ( ( getline < "x_tables_descriptions.csv" ) > 0 ) function_array[$1]=$2;
# lookup function annotation starting with <function>
if ( ARGV[1] == "-w" ) {
for ( function_from_array in function_array )
$ ./lookupx.awk 'x$kglob'
X$KGLOB : kernel generic library cache object
--//這個的查詢特點一定要帶單引號,還是grep方便。
$ grep -i alert x_tables_descriptions.csv
X$DBGALERTEXT|debug alert extended information
X$DIAG_ALERT_EXT|diagnostics alert extended. database alert log details
X$KELRSGA|kernel event alert SGA
X$KELRTD|kernel event alert threshold type descriptions
X$KELTGSD|kernel event alert types generator descriptions
X$KELTOSD|kernel event alert types operations descriptions
X$KELTSD|kernel event alert types descriptions
X$KXDCM_OPEN_ALERTS|kernel execution exadata cell metrics open alerts
--//查詢v_tables_x_tables_mapping.csv可以知道一些對應關係,不過好像不全。
$ grep -i ir_failure v_tables_x_tables_mapping.csv
GV$IR_FAILURE|X$DBKFDG
GV$IR_FAILURE_SET|X$DBKFSET
$ grep -i '^GV$SESSION|' v_tables_x_tables_mapping.csv
GV$SESSION|X$KSUSE
--//僅僅看到1個X表,實際上關聯 x$ksuse , x$ksled , x$kslwt 。
[20241016]Oracle C functions annotations補充.txt
相關文章
- [20191217]Oracle C functions annotations.txtOracleFunction
- [20240618]Oracle C functions annotations.txtOracleFunction
- [20130723]ORACLE 12C Invisible Columns的補充.txtOracle
- [20180105]oracle臨時表補充.txtOracle
- Oracle 12c裡的幾點補充(一)Oracle
- Oracle 補充日誌Oracle
- C_functionsFunction
- Oracle 補充日誌(supplemental log)Oracle
- Oracle WMSYS FunctionsOracleFunction
- Oracle Date FunctionsOracleFunction
- C#基礎語法補充C#
- oracle9i補充日誌Oracle
- 補充:C語言列舉型別C語言型別
- Analytic Functions in OracleFunctionOracle
- C#學習筆記(補充)——擴充套件方法、事件C#筆記套件事件
- Oracle升級中的引數補充Oracle
- [20161012]linux free的補充.txtLinux
- [20160407]bbed修改檔案頭2(補充).txt
- [20120601]ITL的問題補充.txt
- 關於oracle補充日誌作用的理解Oracle
- [20170916]sqlplus set array最小2補充.txtSQL
- [20120809]學習物化檢視(補充).txt
- Oracle Pipelined Table FunctionsOracleFunction
- [20220603]測試quiz night(補充).txtUI
- [20211013]測試遠端監聽補充.txt
- [20220811]奇怪的隱式轉換問題(12c補充測試).txt
- [20130910]12C執行計劃的TABLE ACCESS BY INDEX ROWID BATCHED(補充).txtIndexBAT
- JVM補充篇JVM
- 聯通性補充
- [20190329]探究sql語句相關mutexes補充2.txtSQLMutex
- Oracle Pipelined Table Functions(轉)OracleFunction
- 對 Oracle 備份與恢復 的補充說明Oracle
- Oracle補充日誌及日誌記錄規則Oracle
- oracle10g sga自動管理amm(補充一)Oracle
- oracle 10g sga自動管理amm(補充二)Oracle 10g
- css雜項補充CSS
- redis筆記補充Redis筆記
- Servlet學習補充Servlet