Tracing Oracle Internal Calls - Trace Sqlplus
相當於TOAD的sqlmonitor功能
[oracle10@zhangqiaoc ~]$ ps -ef|grep sqlplus
oracle10 460 412 0 13:35 pts/1 00:00:00 sqlplus
oracle10 841 368 0 13:50 pts/2 00:00:00 grep sqlplus
[oracle10@zhangqiaoc ~]$ gdb -p 460
(gdb) set height 0
(gdb) b kpursetstmttext
Breakpoint 1 at 0xd7debe
(gdb) while (1<2)
>x /s *(unsigned int *)($ebp+12)
>c
>end
0xb7f29000: ""
--[SQLPLUS]------------------------------------------------------
SQL> DECLARE
2 lvc_sql VARCHAR2(1000);
3 BEGIN
4 FOR i IN 1..100 LOOP
5 lvc_sql := 'INSERT INTO test VALUES('||i||')';
6 EXECUTE IMMEDIATE lvc_sql;
7 END LOOP;
8 END;
9 /
PL/SQL procedure successfully completed.
-----------------------------------------------------------------
[Switching to Thread 16384 (LWP 913)]
Breakpoint 1, 0x00ee1ebe in kpursetstmttext ()
from /oracle10/product/10.2/lib/libclntsh.so.10.1
0x80e21f8: "DECLARE\n lvc_sql VARCHAR2(1000);\nBEGIN\n FOR i IN 1..100 LOOP\n lvc_sql := 'INSERT INTO test VALUES('||i||')';\n EXECUTE IMMEDIATE lvc_sql;\n END LOOP;\nEND;"
只測試了SQLPLUS,如果是OCI等連線,可以gdb進去後info func得到方法列表,然後找出可能的FUNC測試下,可能是OCIStmtPrepare
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8242091/viewspace-676975/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle internalOracle
- 關於trace檔案中的recursive calls , elapse time及cpu time,
- Oracle ASH和Session Tracing(ZT)OracleSession
- Oracle-InternalOracle
- Oracle session traceOracleSession
- 如何啟用sqlplus的auto trace功能(zt)SQL
- oracle INTERNAL_FUNCTIONOracleFunction
- [20170703]Oracle Call Interface TracingOracle
- Oracle sql trace用法OracleSQL
- How to enable trace in OracleOracle
- Oracle Trace 及TKPROFOracle
- ORACLE TRACE 10046Oracle
- 【TRACE】Oracle跟蹤事件Oracle事件
- oracle trace檔案解析Oracle
- 設定 oracle event traceOracle
- oracle“SQL Trace”簡介OracleSQL
- How Oracle Store Number internal(zt)Oracle
- Oracle 10046 SQL TRACEOracleSQL
- oracle trace檔名查詢Oracle
- oracle Database Event trace 設定OracleDatabase
- 在unity5中減少Draw Calls(SetPass Calls)[轉]Unity
- [Javascript] Proper Tail CallsJavaScriptAI
- Oracle優化案例-復現SQL ordered by Parse Calls(三十二)Oracle優化SQL
- Oracle關閉不了,SHUTDOWN: waiting for active calls to completeOracleAI
- How Oracle Store Number internal?(轉載)Oracle
- oracle redo internal 之 dump logfileOracle Redo
- oracle redo internal 之 dump logfileOracle
- Oracle診斷案例-Sql_traceOracleSQL
- 用oracle trace 來跟蹤sessionOracleSession
- Oracle EBS 如何生成trace檔案Oracle
- oracle監聽開啟trace fileOracle
- Oracle SQL_TRACE使用小結OracleSQL
- Oracle例項關閉:SHUTDOWN: waiting for active calls to completeOracleAI
- oracle redo internal (2) --- dump內容理解Oracle Redo
- oracle redo internal (2) --- dump內容理解Oracle
- 如何在solaris的oracle sqlplus中使用sqlplusOracleSQL
- Oracle檢視trace檔案步驟Oracle
- Oracle SQL Trace 和 10046 事件OracleSQL事件