Steps for using Oracle tkprof

Source: Internet
Author: User

1. tkprof is an executable tool for analyzing Oracle tracking files and generating more user-friendly and clear output results. C:/Oracle/ora92/bin/tkprof.exe

2. Full name of tkprof

References

Http://www.itpub.net/showthread.php? S = cbfea4845ef5b2a3f4adb00de0de9317 & threadid = 577624 & Highlight = tkprof

3. Basic Steps

1) SQL> alter system set timed_statistics = true;

2) user-level self-tracking:

SQL> alter session set SQL _trace = true;

SQL> alter session set SQL _trace = false;

User-level DBA tracking: (for example, sys tracking test, You need to log on with sysdba)

. A). SQL> select S. username, S. Sid, S. Serial #, S. Command from V $ session s

Where S. Username = 'colm ';

B). SQL> exec SYS. dbms_system.set_ SQL _trace_in_session (9, 7, true );

C). SQL> exec SYS. dbms_system.set_ SQL _trace_in_session (9, 7, false );

PS: 9 is Sid, 7 is serial #

3) C:> Cd C:/Oracle/admin/Colm/udump

4) C:/Oracle/admin/Colm/udump> tkprof colm_ora_2056.trc trace.txt print = 100 record1_ SQL .txt sys = No

5) trace.txt File

Example:

**************************************** ***************************************

Select *

From

Col_case

 

Call count CPU elapsed disk query current rows

-----------------------------------------------------------------------

Parse 1 0.00 0.00 0 0 0 0

Execute 0 0.00 0.00 0 0 0 0

Fetch 0 0.00 0.00 0 0 0 0

-----------------------------------------------------------------------

Total 1 0.00 0.00 0 0 0 0

 

Misses in library Cache during parse: 1

Optimizer goal: Choose

Parsing user ID: 62

The statements to be adjusted meet the following requirements:

(1). Excessive CPU usage

(2). parse, execute, fetch takes too much time

(3) Too many disk reads, and too few data blocks are read in query/current (SGA ).

(4). Access Multiple blocks and return only 2 rows

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.