Oracle/Oracle 12C

oracle 12c Multiple Trace File

darkturtle26 2019. 6. 21. 14:12

2021/11/06

여러 개의 파일을 합치기보다

아래 처럼 파일 제한을 늘리면 됨 ( max size / 5 = 파일 하나당 사이즈 제한이라. )

샘플 ) ALTER SESSION SET MAX_DUMP_FILE_SIZE= '5121M' ; -- ( 1024*5 ) + 1 

Orange 경우, 10046 multi file 에 대해서 plan 요상하게 나옴

차라리 한개 파일 사이즈를 최대한 늘려서, 한개의 10046 trace 파일 생성 하여, 깔끔하게 보자


https://jonathanlewis.wordpress.com/2016/01/26/trace-file-size/
https://antognini.ch/2016/10/trace-files-split-in-multiple-parts/

https://docs.oracle.com/database/121/REFRN/GUID-C58CF881-8233-4C73-B1F2-56F76BBC4469.htm#REFRN10103

MAX_DUMP_FILE_SIZE specifies the maximum size of trace files (excluding the alert log). Change this limit if you are concerned that trace files may use too much space.
-. A numeric value for MAX_DUMP_FILE_SIZE specifies the maximum size in operating system blocks.
-. A numeric value followed by a K or M or G suffix specifies the file size in kilobytes, megabytes, or gigabytes.
-. The special value string UNLIMITED means that there is no upper limit on trace file size. Thus, dump files can be as large as the operating system permits.

When the trace file is limited in size, it may be automatically split into multiple files, called segments, 
if needed. The segments will have the same file name as the active trace file, but with an extra segment number appended.

The trace file can be split into a maximum of 5 segments, and the size of each segment will typically be 1/5th of the trace file limit.

When the combined size of all the trace file segments exceeds the specified limit, the oldest segment is deleted, and a new, empty segment is created. 
Thus, the trace file always contains the most recent trace information.

Note that the first segment is never deleted, because it may contain relevant information about the initial state of the process.

( 튜닝을 위한 trace 확인 방법)
개별 파일을 아래처럼 통합 후, trkprof 로 trace 확인 하기
cat 001.trc >> all.trc
cat 002.trc >> all.trc
tkprof all.trc all.txt sys=no