set autotrace in SQL*Plus
set autotrace off
set autotrace on
set autotrace traceonly
set autotrace on explain
set autotrace on statistics
set autotrace on explain statistics
set autotrace traceonly explain
set autotrace traceonly statistics
set autotrace traceonly explain statistics
set autotrace off explain
set autotrace off statistics
set autotrace off explain statistics
Setting autotrace allows to display some statistics and/or an query execution plan for DML statements.
set autotrace on: Shows the execution plan as well as statistics of the statement.
set autotrace on explain: Displays the execution plan only.
set autotrace on statistics: Displays the statistics only.
set autotrace traceonly: Displays the execution plan and the statistics (as set autotrace on does), but doesn't print a query's result.
set autotrace off: Disables all autotrace
If autotrace is enabled with statistics, then the following statistics are displayed:
* recursive calls
* db block gets
* consistent gets
* physical reads
* redo size
* bytes sent via SQL*Net to client
* bytes received via SQL*Net from client
* SQL*Net roundtrips to/from client
* sorts (memory)
* sorts (disk)
Additionally, there is rows processed which is not found in v$statname.
Prerequisites
The explain plan feature of autotrace requires a plan_table which can be created with $ORACLE_HOME/rdbms/admin/utlxplan.sql
The statistic feature requires that the user is granted select on v_$sesstat, v_$statname and v_$session.
An Oracle installation comes with $ORACLE_HOME/sqlplus/admin/plustrce.sql which installs the role plustrace. plustrace is granted those select rights. If now plustrace is granted to a user, he will then be able to turn autotrace on. Alternatively, plustrace can be granted to public.
[@more@]autotrace
set autotrace on
set autotrace traceonly
set autotrace on explain
set autotrace on statistics
set autotrace on explain statistics
set autotrace traceonly explain
set autotrace traceonly statistics
set autotrace traceonly explain statistics
set autotrace off explain
set autotrace off statistics
set autotrace off explain statistics
Setting autotrace allows to display some statistics and/or an query execution plan for DML statements.
set autotrace on: Shows the execution plan as well as statistics of the statement.
set autotrace on explain: Displays the execution plan only.
set autotrace on statistics: Displays the statistics only.
set autotrace traceonly: Displays the execution plan and the statistics (as set autotrace on does), but doesn't print a query's result.
set autotrace off: Disables all autotrace
If autotrace is enabled with statistics, then the following statistics are displayed:
* recursive calls
* db block gets
* consistent gets
* physical reads
* redo size
* bytes sent via SQL*Net to client
* bytes received via SQL*Net from client
* SQL*Net roundtrips to/from client
* sorts (memory)
* sorts (disk)
Additionally, there is rows processed which is not found in v$statname.
Prerequisites
The explain plan feature of autotrace requires a plan_table which can be created with $ORACLE_HOME/rdbms/admin/utlxplan.sql
The statistic feature requires that the user is granted select on v_$sesstat, v_$statname and v_$session.
An Oracle installation comes with $ORACLE_HOME/sqlplus/admin/plustrce.sql which installs the role plustrace. plustrace is granted those select rights. If now plustrace is granted to a user, he will then be able to turn autotrace on. Alternatively, plustrace can be granted to public.
[@more@]autotrace
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26651/viewspace-1038066/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SQL*Plus Set引數詳解SQL
- 使用set autotrace on 檢視資料庫執行計劃資料庫
- 1.3.2. 關於SQL*PlusSQL
- mybatis-plus匯入sql日誌MyBatisSQL
- 自動設定autotrace環境
- Mybatis-plus核心功能-自定義SQLMyBatisSQL
- 1.3.3.5.1. SQL*Plus 連線命令語法SQL
- 1.3.3.4. 步驟3:啟動SQL*PlusSQL
- 3.1.1.1 使用 SQL*Plus 啟動資料庫SQL資料庫
- 獲取執行計劃之Autotrace
- 1.3.3. 通過SQL*Plus 連線資料庫SQL資料庫
- MySQL: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1MySql
- [20181107]18c set feedback顯示sql_id.txtSQL
- Mybatis-Plus如何自定義SQL隱碼攻擊器?MyBatisSQL
- autotrace該怎麼用?那些選項是啥意思?
- MYSQL SET型別欄位的SQL操作知識介紹MySql型別
- Mybatis-Plus的應用場景及注入SQL原理分析MyBatisSQL
- Oracle 12c 檢視CDB&PDBs資訊(SQL*PLUS)OracleSQL
- [ERR] 1231 - Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'SQL
- 1.3.3.1. 關於連線資料庫的SQL*Plus 工具描述資料庫SQL
- MsSql資料庫使用SQL plus建立DDL和DML操作方法SQL資料庫
- Oracle autotrace 報 SP2-0618 PLUSTRACE role 問題解決Oracle
- MyBatis系列(七):MyBatis動態Sql之choose,where,set標籤的用法MyBatisSQL
- mybatis plus 執行sql報錯 CommunicationsException, druid version 1.2.13, jdbcUrl : jdbc:mysql://XXXMyBatisExceptionUIJDBCMySql
- mybatis-plus連線SQL Server2012分頁查詢異常MyBatisSQLServer
- 1.3.3.5. 步驟4:執行SQL*Plus 連線資料庫命令SQL資料庫
- Set
- set /?
- lombok get/set 與 JavaBean get/setLombokJavaBean
- [Javascript] Perform Set Operations using JavaScript Set MethodsJavaScriptORM
- set -e
- Jet Set
- set -o
- Centos7下安裝Sql*Plus並連線遠端Oralce伺服器CentOSSQL伺服器
- G014-ORACLE-ASK O SQL*PLUS / 達夢DiSQL / 高斯ZSQL 命令列翻頁OracleSQL命令列
- Vue.set與vue.$set的使用Vue
- 訓練集(train set),驗證集(validation set)和測試集(test set)AI
- alter system set event和set events的區別
- MyBatis從入門到精通(七):MyBatis動態Sql之choose,where,set標籤的用法MyBatisSQL