首页 > 数据库 > Oracle > Oracle's TKPROF
Oracle's TKPROF | ||
TKPROF stands for transient kernel profiler. Enabling SQL TRACETo be able to use TKPROF, you must first enable sql trace. This can be done for either the instance or the session. If you want to change it for the entire instance, set sql_trace=true into the init.ora file and restart the instance. However, usually, you'll want to turn on sql trace for a particular session only. This can be done like so: or, from another session with a sys.dbms_system.set_sql_trace_in_session(session's id,serial number, true) Timed StatisticsYou can have Oracle include timing information into the sql trace files as well. Either set the timed_statistics parameter to true or issue an or Finding the SQL trace fileThe trace files will be written into the directory pointed to by the parameter user_dump_dest. You can query for the value with select value from v$parameter where name = 'user_dump_dest'. See find the trace file to see where the tk prof file goes. Format of the trace fileSee this link. Maximum size of the trace fileThe init parameter max_dump_file_size allows to set the maximum size of the trace files. Valid values for this parameter are: unlimited, a number followed by a K or a M or a number. If the value is a number only, it indicates how many OS Blocks the file can grow to. K or M set the file's maximum size in kilo or mega bytes. Using tkprofFollow the following links: ThanksThanks to Julia Lovick who reported an error on this page. |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/330796/viewspace-867637/ ,如需转载,请注明出处,否则将追究法律责任。