EVENT: 10046 "enable SQL statement tracing (including binds/waits)"
EVENT: 10046 "enable SQL statement tracing (including binds/waits)" [ID 21154.1] | |||||
Modified 11-NOV-2007 Type REFERENCE Status PUBLISHED |
Event:10046 Text: enable SQL statement timing ------------------------------------------------------------------------------- For details of interpreting 10046 output see: Note:39817.1 Explanation: This is a special EVENT code. It can be used to signal Oracle to perform SQL_TRACE type actions. The 10046 trace is the equivalent of setting SQL_TRACE=TRUE. The advantage of using the event is that extra details may be output to the trace file depending on the level specified with the event. For Customers: This event has been wrapped up for use by customers in the DBMS_SUPPORT package as described in Note:62294.1 For Oracle Employees: The notes below describe the levels for this event. The methods of setting trace here are not for general customer use. 10046 EVENT levels: 1 - Enable standard SQL_TRACE functionality (Default) 4 - As Level 1 PLUS trace bind values 8 - As Level 1 PLUS trace waits This is especially useful for spotting latch wait etc. but can also be used to spot full table scans and index scans. 12 - As Level 1 PLUS both trace bind values and waits Example Syntax: Session level: alter session set events '10046 trace name context forever'; alter session set events '10046 trace name context forever, level 8'; alter session set events '10046 trace name context off'; Init.ora: event="10046 trace name context forever,level 4" WARNING: This will trace ALL database sessions From oradebug (7.3+): oradebug event 10046 trace name context forever, level 4 From oradbx (pre 7.3): event 10046 trace name context forever, level 4 Articles: Interpreting RAW 10046 output Note:39817.1 How to enable 10046 for another session using ORADEBUG Note:1058210.6 EXAMPLES: ~~~~~~~~~ Wait Information: nam is what is being waited for ela is the elapsed time for the operation In Oracle7 / 8 this is in units of hundredths of a second In Oracle9i onwards this is in microseconds p1 is the file number p2 is the block number p3 is the number of blocks read by the operation Waiting for a Full Table Scan: WAIT #1: nam="db file scattered read" ela= 5 p1=4 p2=1435 p3=25 WAIT #1: nam="db file scattered read" ela= 7 p1=4 p2=1461 p3=32 WAIT #1: nam="db file scattered read" ela= 7 p1=4 p2=1493 p3=32 The first wait indicates a mutliblock read was issued for 25 blocks starting at file 4 block 1435. This took 5/100th of a second. The next 2 lines also show multiblock reads of 32 blocks (which is probably the value of[@more@]) Waiting for an Index Scan: WAIT #1: nam="db file sequential read" ela= 4 p1=4 p2=1224 p3=1 WAIT #1: nam="db file sequential read" ela= 4 p1=4 p2=1788 p3=1 This is the sort of output you would see on an index scan or an individual block access to table block.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9907339/viewspace-1038048/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Event 10046 - Enable SQL Statement TraceSQL
- oracle sql跟蹤 event 10046 - 轉OracleSQL
- 使用 oracle 10046 eventOracle
- event 10046等的設定
- oracle event 10046 level_事件Oracle事件
- Quoted- How Bulk Binds in PL/SQL Boost PerformanceSQLORM
- Oracle 10046 event詳解-轉載Oracle
- Statement (操作 SQL 語句)SQL
- Script: resource_waits.sqlAISQL
- 【EVENT】使用10046事件獲取SQL語句中繫結變數的具體值事件SQL變數
- Oracle 10046 SQL TRACEOracleSQL
- Oracle 19c中的等待事件分類 Event WaitsOracle事件AI
- sql_trace/ 10046 整理SQL
- sql_trace and 10046事件SQL事件
- 跟蹤SQL - SQL Trace 及 10046 事件SQL事件
- 使用10046 event trace跟蹤全表掃描操作
- Oracle SQL Trace 和 10046 事件OracleSQL事件
- 讀懂Oracle 10046 SQL TRACEOracleSQL
- Oracle SQL Trace 和10046 事件OracleSQL事件
- oracle sql tuning 14 --10046OracleSQL
- Oracle中開啟trace 10046 event 的各種方法[zt]Oracle
- HOWTO--Generating SQL trace files(Including 10g)SQL
- SQL java.sql.SQLException: Parameter metadata not available for the given statementSQLJavaExceptionAI
- ORA-01555 caused by SQL statement belowSQL
- IMP-00032: SQL statement exceeded buffer lengthSQL
- In PL/SQL,the statement of "into variable" wasn't appeared in statspackSQLAPP
- 10046事件跟蹤會話sql事件會話SQL
- oracle sql trace與10046淺談OracleSQL
- Maclean教你讀Oracle 10046 SQL TRACEMacOracleSQL
- 使用10046跟蹤sql語句SQL
- Statement Tracer For Oracle 與 SQL Monitor 的比較OracleSQL
- 跟蹤資料庫的命令:event 10046等的設定(ZT)資料庫
- 單個SQL語句的10046 traceSQL
- sql_trace、10046、10053、tkprofSQL
- 如何使用SQL_TRACE和10046事件SQL事件
- 在SQL*PLUS下使用10046事件例子SQL事件
- Statement
- 利用10046事件收集SQL的trace檔案事件SQL