[20170703]Oracle Call Interface Tracing
[20170703]Oracle Call Interface (OCI) Tracing.txt
--//不熟悉這些東西,僅僅做一個記錄.
The Oracle Call Interface (OCI) is a set of APIs which provides interaction with an Oracle database. It supports all
phases of a SQL statement execution.
If you ever wondered how to trace OCI function calls you can do it by setting EVENT_10842 environment variable.
--//例子:
set ORA_CLIENTTRACE_DIR=d:\temp
set EVENT_10842=server=all;user=all;stmt=all;level=15
--//注意:必須設定DIAG_ADR_ENABLED=off 在 sqlnet.ora中.在client還是服務端呢?
For ORA_CLIENTTRACE_DIR to take effect Automatic Diagnostic Repository (ADR) has to be disabled. You can disable it by
setting DIAG_ADR_ENABLED=off in your sqlnet.ora.
A tracefile is generated for each connection in the format of ora_skgu_<pid>.trc1 where pid is the process id of the
connection on the (client) system.
The following levels are supported:
1 - Trace all server attach and server detach calls for servers listed in "server" attribute of the environment
variable.
2 - Trace all session begin, logon, session end, logoff calls for the users listed in "user" attribute of the
environment variable.
3 - Trace all prepare, execute, fetch calls for the specified statement types listed in "stmt" attribute of environment
variable.
4 - Trace all Bind, Define, Describe calls.
5 - Trace all OCI LOB calls
7 - Get statistical info on all connection pooling /connection related calls
8 - Get statistical info on all session info
9 - Get statistical info on all handle info
10 - Get statistical info on time taken in execute and fetch calls
11 - Get statistical info on transaction related calls
15 - Trace all calls with statistical info.
--//根據上面的資訊自己測試看看:
1.環境:
SCOTT@book> @ &r/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
2.在client端執行:
R:\>set ORA_CLIENTTRACE_DIR=r:\
R:\>set EVENT_10842=server=all;user=all;stmt=all;level=15
--//登入後,執行sqlplus語句沒有任何像ora_skgu_<pid>.trc1檔案產生.
--//先嚐試修改client的sqlnet.ora檔案看看.
SCOTT@78> host ls -l r:\*.trc1
-rw-rw-rw- 1 user group 22794 Jul 3 10:42 r:\ora_skgu_6708.trc1
--//OK,確實可以產生跟蹤檔案.裡面一堆資訊,看不懂..^_^.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2141514/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle ASH和Session Tracing(ZT)OracleSession
- Tracing Oracle Internal Calls - Trace SqlplusOracleSQL
- Oracle Payment Interface安裝Oracle
- Oracle Applications Interface ProgramsOracleAPP
- Oracle wait interface -- sessionOracleAISession
- Oracle, History and the Wait InterfaceOracleAI
- Oracle Wait Interface解釋OracleAI
- ORACLE SQL DEVELOPER User Interface ChangeOracleSQLDeveloper
- Oracle wait interface - ORA-00054: resource busyOracleAI
- ray tracing in one weekend - 5
- interface method 返回 interface 如何實現?
- Tracing the LSNRCTL Control Utility
- SQL*Net & Oracle Net Services - Tracing and Logging at a Glance [ID 219968.1]SQLOracle996
- interface/介面
- How to Change Interconnect/Public Interface IP or Subnet in Oracle ClusterwareOracle
- 理解call和實現call
- [20170703]SQL語句分析執行過程.txtSQL
- Tracing Enhancements Using DBMS_MONITOR
- Lecture 12 Real-time Ray Tracing
- golang使用sqlx報錯:unsupported type []interface {}, a slice of interfaceGolangSQL
- [摘錄]Oracle Wait Interface之Buffer busy waits事件OracleAI事件
- Oracle10g New Feature -- 11. Wait InterfaceOracleAI
- Golang之interfaceGolang
- C#--interfaceC#
- Castor和interfaceAST
- Interface中加Static
- JavaScript call()JavaScript
- js callJS
- call() 方法
- __call__
- IPC call
- Oracle Wait Interface效能診斷與調整實踐指南OracleAI
- public interface View介面和public interface ViewResolver介面介紹View
- 如何理解 interface 介面
- Java-介面(interface)Java
- golang interface淺談Golang
- java基礎:interfaceJava
- java之介面interfaceJava