Running a Trace on a Process [ID 148145.1]
--------------------------------------------------------------------------------
The purpose of this document is to inform. users of all Releases of Oracle
Applications software how to execute a trace on a process.
SCOPE & APPLICATION
-------------------
This document is intended for users of all Releases of Oracle Applications
software that need to run traces on processes where a process terminates with an
ORA error or a process is running for a very long time.
RUNNING A TRACE ON A PROCESS
----------------------------
1) Make sure that a directory has been established for the trace output, and for
performance issues on a process, also make sure that timed statistics are turned
on. To discern the directory where the trace will be written to, execute the
following sql:
select value from v$parameter where name = 'user_dump_dest';//查找trace文件存放路径
To turn timed statistics on, execute the following sql:
alter system set timed_statistics = true; //设置时间统计功能开
--------------------------------------------------------------------------------
The purpose of this document is to inform. users of all Releases of Oracle
Applications software how to execute a trace on a process.
SCOPE & APPLICATION
-------------------
This document is intended for users of all Releases of Oracle Applications
software that need to run traces on processes where a process terminates with an
ORA error or a process is running for a very long time.
RUNNING A TRACE ON A PROCESS
----------------------------
1) Make sure that a directory has been established for the trace output, and for
performance issues on a process, also make sure that timed statistics are turned
on. To discern the directory where the trace will be written to, execute the
following sql:
select value from v$parameter where name = 'user_dump_dest';//查找trace文件存放路径
//trace文件存放路径:[/ora1159/prod/proddb/9.2.0/admin/PROD_erpapp/udump]
To turn timed statistics on, execute the following sql:
alter system set timed_statistics = true; //设置时间统计功能开
在sqlplus 下执行即可
2) Make sure that trace has been enabled for the process by doing the following:
a) Navigate to System Administrator -> Concurrent -> Program -> Define.//并发-方案-定义
b) On the Concurrent Programs form, with your cursor in the Program field,
do query enter, enter the name of the process to be traced, i.e. enter
GMS:%Costing%Expense% to query up the GMS: Costing and Funds Check on
Expense Report process, then enter query run.//查找出需要跟踪的请求程序定义
c) In the Request region of the Concurrent Programs form, check the box
entitled "Enable Trace".//在程序定义的请求区域,将允许跟踪选项打勾。
d) Close the Concurrent Programs form. and exit to Navigator.//关闭并发程序的form。
3) In the Grants Super User responsibility(授权的超级用户责任下), submit the process as follows:
在相应的超级用户职责下(该请求程序被授权给该职责),提交请求:查看-请求-提交新请求-单个请求:选择相关的请求,填写相关的参数后,运行。
2) Make sure that trace has been enabled for the process by doing the following:
a) Navigate to System Administrator -> Concurrent -> Program -> Define.//并发-方案-定义
b) On the Concurrent Programs form, with your cursor in the Program field,
do query enter, enter the name of the process to be traced, i.e. enter
GMS:%Costing%Expense% to query up the GMS: Costing and Funds Check on
Expense Report process, then enter query run.//查找出需要跟踪的请求程序定义
c) In the Request region of the Concurrent Programs form, check the box
entitled "Enable Trace".//在程序定义的请求区域,将允许跟踪选项打勾。
d) Close the Concurrent Programs form. and exit to Navigator.//关闭并发程序的form。
3) In the Grants Super User responsibility(授权的超级用户责任下), submit the process as follows:
在相应的超级用户职责下(该请求程序被授权给该职责),提交请求:查看-请求-提交新请求-单个请求:选择相关的请求,填写相关的参数后,运行。
a) For Release 11i users, navigate to Reports -> Run. (请求->运行) In the submit a new
request form, choose either single request or request set and click on the
OK button. In the submit request form, choose the process from the list
of values, enter any and all relevant parameters and submit the process.
b) For Release 10.7 and 11.0 users, navigate to Other -> Requests -> Run.
In the submit a new request form, choose either single request or request
set and click on the OK button. In the submit request form, choose the
process from the list of values, enter any and all relevant parameters and
submit the process.
4) Once the process has completed, position your cursor on the relevant process
on the request form, click on the view output button, and save a copy of the
output; click on the view log button and save a copy of the log.
request form, choose either single request or request set and click on the
OK button. In the submit request form, choose the process from the list
of values, enter any and all relevant parameters and submit the process.
b) For Release 10.7 and 11.0 users, navigate to Other -> Requests -> Run.
In the submit a new request form, choose either single request or request
set and click on the OK button. In the submit request form, choose the
process from the list of values, enter any and all relevant parameters and
submit the process.
4) Once the process has completed, position your cursor on the relevant process
on the request form, click on the view output button, and save a copy of the
output; click on the view log button and save a copy of the log.
//一旦请求执行完毕,将光标放到刚执行的请求上,点击查看输出按钮,将输出保存为文本文件。点击查看日志按钮,导出文本文件。
5) Turn timed statistics off by executing the following sql: //关闭时间统计功能
alter system set timed_statistics = false; //设置时间统计功能关
6) You can find the trace file (*.trc) by checking in the INIT.ORA file for the
user_dump_dest directory location, or you can execute the following sql:
你现在可以去查找刚生成的trace文件了,路径就是上面查找出的路径,也可以在 INIT.ORA中的user_dump_dest 项查看。或者再执行下面的语句。
select value from v$parameter where name = 'user_dump_dest'; //查找trace文件存放路径
这个是96上的路径:/ora1159/prod/proddb/9.2.0/admin/PROD_erpapp/udump。在该路径下,按时间排序,第一个文件即是刚生成的trace文件。
5) Turn timed statistics off by executing the following sql: //关闭时间统计功能
alter system set timed_statistics = false; //设置时间统计功能关
6) You can find the trace file (*.trc) by checking in the INIT.ORA file for the
user_dump_dest directory location, or you can execute the following sql:
你现在可以去查找刚生成的trace文件了,路径就是上面查找出的路径,也可以在 INIT.ORA中的user_dump_dest 项查看。或者再执行下面的语句。
select value from v$parameter where name = 'user_dump_dest'; //查找trace文件存放路径
这个是96上的路径:/ora1159/prod/proddb/9.2.0/admin/PROD_erpapp/udump。在该路径下,按时间排序,第一个文件即是刚生成的trace文件。
查看命令是 >ls -lt ./
With Explain Plan, Note 148137.1.
使用Tkprof命令处理该trace文件,具体用法另有解释。
8) Upload the following to Metalink under the associated TAR number:
将以下4个文件提交给Metalink。
a) copy of output;//输出文件
b) copy of log;//日志文件
c) raw trace file; and //trace文件
d) tkprof'd trace file.//执行过的trace文件
7) Tkprof the trace file with an explain plan. If it is a performance issue,
tkprof the trace file with an explain plan and sort. See Tkprof a Trace File With Explain Plan, Note 148137.1.
使用Tkprof命令处理该trace文件,具体用法另有解释。
8) Upload the following to Metalink under the associated TAR number:
将以下4个文件提交给Metalink。
a) copy of output;//输出文件
b) copy of log;//日志文件
c) raw trace file; and //trace文件
d) tkprof'd trace file.//执行过的trace文件
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10359218/viewspace-677410/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10359218/viewspace-677410/
本文档详细介绍了如何在Oracle Applications软件中对出现ORA错误或运行时间过长的进程进行跟踪。主要内容包括设置跟踪输出目录、开启时间统计、启用进程跟踪、提交请求及获取分析跟踪文件。
106

被折叠的 条评论
为什么被折叠?



