'oradebug'에 해당되는 글 1건

  1. 2009/04/27 [Oracle] oradebug session trace 뜨기 (2)

[Oracle] oradebug session trace 뜨기

|
oracle sql을 튜닝하거나, 문제가 발생했을때, 세션에 대해 좀 더 세밀하게 trace 할 필요가 있을때가 있다. 이때는 oradebug을 이용해서 하도록 한다.

참고문서: http://www.oracleutilities.com/wiki/index.php?title=Oradebug

1. os pid 얻기
SQL> select username, spid from v$process;
2. trace할 pid 설정하기
SQL> oradebug setospid 2280
3. trace 파일 설정하기
oradebug tracefile_name c:\oratrace_file\mooracle_ora_2280.trc
4. trace level 설정
SQL> oradebug event 10046 trace name context forever, level 12
## trace level
Level 1 - provides "base set" tracing information. Bind variables are displayed as variables (:b1).
Level 4 - provides Level 1 data and the actual data values of bind variables.
Level 8 - provides Level 1 data and information on wait events when the elapsed time is greater than the CPU time.
Level 12 - combines levels 1, 4 and 8 tracing information. A Level 12 trace contains base set, bind variable values and wait events.
5. trace 종료
SQL> oradebug event 10046 trace name context off
이올린에 북마크하기(0) 이올린에 추천하기(0)
Trackback 0 And Comment 2
prev | 1 | next