Gblog

おもにTips

よくつかう tkprof のオプション

よく使うのに忘れる。

  • AGGREGATE = { YES | NO }
  • SYS = { YES | NO }

そもそも、tkprof をたまにしか使わないから。

ちなみに、こんな感じ

tkprof db1_ora_9999.trc db1_ora_9999 sys=no 

出力ファイルのデフォルトの拡張子は、.prf なので、この例だと db1_ora_9999.prf が出力される。

 

tkprof に他にオプションがあるのかというと、

[ora12201@osaki122 trace]$ tkprof
Usage: tkprof tracefile outputfile [explain= ] [table= ]
[print= ] [insert= ] [sys= ] [sort= ]
table=schema.tablename Use 'schema.tablename' with 'explain=' option.
explain=user/password Connect to ORACLE and issue EXPLAIN PLAN.
print=integer List only the first 'integer' SQL statements.
pdbtrace=user/password Connect to ORACLE to retrieve SQL trace records.
aggregate=yes|no
insert=filename List SQL statements and data inside INSERT statements.
sys=no TKPROF does not list SQL statements run as user SYS.
record=filename Record non-recursive statements found in the trace file.
waits=yes|no Record summary for any wait events found in the trace file.
sort=option Set of zero or more of the following sort options: 

 

結構あった!