tkprof具体有什么用途?
怎么使用?最好给个例子?

解决方案 »

  1.   

    You can run the TKPROF program to format the contents of the trace file and place the output into a readable output file. Optionally, TKPROF can also: Determine the execution plans of SQL statements Create a SQL script that stores the statistics in the database TKPROF reports each statement executed with the resources it has consumed, the number of times it was called, and the number of rows which it processed. This information lets you easily locate those statements that are using the greatest resource. With experience or with baselines available, you can assess whether the resources used are reasonable given the work done. 
    例子比较麻烦,你还是到GOOGLE上去搜一下吧
      

  2.   

    最简单的用法是:
    tkprof 跟踪文件名 输出文件名
    可以直接运行不带参数的tkprof命令查看使用帮助.
      

  3.   

    tkprof 能够跟踪每个session的sql操作吗?
    我写tkprof c:\a1.txt c:\a2.txt
    提示could not open trace file c:\a1.txt
    怎么解决呀?
      

  4.   

    跟踪文件是oracle自动生成,你不能随便拿个文件来搞啊。你可以在
    oracle目录下查找*.trc文件,找一个来试试