Raw Trace的收集方法
1. 開啟Trace,Help > Diagnostics > Trace > Trace > Trace with Binds and Waits
Trace項代表的意思
- No Trace – turns trace off.
- Regular Trace – generates a regular SQL trace by performing the following statement:
ALTER SESSION SET SQL_TRACE = TRUE;
- Trace with Binds – writes bind variable values in the SQL trace file
- Trace with Waits – writes wait events in the SQL trace file
- Trace with Binds and Waits – writes both bind variable values and wait events in the SQL trace file
2.執行業務功能
3.關閉Trace,Help > Diagnostics > Trace > Trace > No Trace
系統會彈出一個視窗,告訴你Trace檔案所在的目錄。
這個目錄實際上是資料庫系統參數表(v$parameter)中的user_dump_dest的值,可以執行下邊的SQL來找到Trace檔案所在的目錄
- SELECT value FROM v$parameter WHERE name = 'user_dump_dest';
-
- Output:/slot/ems7061/Oracle/db/tech_st/11.2.0/admin/az1mu213_rws60145rems/diag/rdbms/az1mu213/az1mu213/trace
trace檔案名稱後邊的那個數字是Database Server PID,也可以從Help>About中找到。