FORM级别和数据库级别的Trace
metalink上的文章较全的,中文的可参考我的博客EBS开发技术之trace http://blog.csdn.net/cai_xingyun/article/details/17250971
This document provides instructions on how to create and retrieve Forms and Database level SQL trace. The example details below are for receiving processes,
but these instructions are also applicable for other forms and concurrent processes.
Please reference Note 299497.1 for instructions on how to gather debug information for receiving processes.
Forms Level Trace
Forms level trace is SQL trace generated before the transaction is saved on a form. It is enabled from the form and captures SQL code related to the execution of the form. This should be used when the error occurs on the form BEFORE clicking on the save.
Typically these are FRM or APP errors but there could be other varying error messages.
Steps to generate forms level trace:
- Navigate to the point in the application right before you are experiencing the problem.
- Turn trace on by: Help > Diagnostics > Trace > Trace with Binds (May require password)
- A pop-up message with trace file location and name will be displayed. Note the filename and path.
- Duplicate the error and then stop immediately afterwards.
Help > Diagnostics > Trace > No Trace - Retrieve trace file from the user_dump_dest, which can be located as follows:
select value from V$PARAMETER where name like 'user%'; - Run the trace file through tkprof as follows:
tkprof <filename>.trc <filename>.out explain=<found username/password>
example: tkprof file1234.trc file1234.out explain=<apps/apps>
Database Level Trace
Database level trace is SQL trace generated after the transaction is saved and receiving transaction processor is processing the transaction. This should be generated when the error occurs AFTER clicking Save to commit the transaction on a receiving form.
In Online receiving mode typically "rvtptcontrol failed" error occurs. For Immediate or Batch receiving modes the error(s) is recorded in the receiving transaction processor concurrent request log file. There are many ways to gather a database trace file
for receiving processes.
Methods to Generate Database Level Trace
1. Profile PO: Enable SQL Trace for Receiving Processor
Setting this profile to ‘Yes’ will generate a Event 10046 Level 12 database level trace for the receiving transaction being saved.
Steps to generate trace file:
- Set profile at user level
- Bring up the Core application - System Administrator responsibility
- Go to Profile > System
- Check off the USER box - and enter the username of the user for whom trace needs to be enabled
- Search on the following profile option - 'PO: Enable SQL Trace for Receiving Processor'
- At the user level, set the value of the profile to 'Yes'
- Once the profile is set, please change responsibilities and directly go and reproduce the problem.
Error message will be displayed on the form only in online mode. In Immediate / Batch mode, the error will be recorded in the concurrent request log file of Receiving Transaction Processor.
- Unset the profile before logging off the applications.
Location of the trace file:
- If the transaction was done in Online mode, then the trace file can be found in user_dump_dest, which can be located as follows:
select value from V$PARAMETER where name like 'user%';
- If the transaction was done in Immediate or Batch mode, the SQL statement from method below (Enable trace for concurrent program) can be used to retrieve the location and name of the trace file.
2. Enable trace for the concurrent program
This can be used only when saving the transaction in Immediate or Batch mode. This method generates an Event 10046 Level 1 trace only with no bind variables and no waits.
Steps to generate trace file:
- Enable trace for concurrent program:
- Bring up the Core application - System Administrator responsibility
- Goto Concurrent > Program > Define
- Query the concurrent program (shortname = RVCTP)
- Check the trace box to enable trace and Save
- Change responsibilities and directly go and reproduce the problem. In this method, the error message, if any, will not be displayed on the form.
- Navigate to View > Requests and confirm that Receiving Transaction Processor has completed. The request may or may not end in error. The request log file should show an error. Note the Concurrent Request Id.
Location of the trace file:
The trace file can be located using the SQL below. Use the concurrent request id noted in step 3.
SQL>
prompt
undefine request_id
accept request_id
prompt 'Please enter the concurrent request id of Receiving Transaction Processor:'
prompt column traceid format a8
column tracename format a80
column user_concurrent_program_name format a40
column execname format a15
column enable_trace format a12
set lines 80
set pages 22
set head off SELECT 'Request id: '||request_id ,
'Trace id: '||oracle_Process_id,
'Trace Flag: '||req.enable_trace,
'Trace Name:
'||dest.value||'/'||lower(dbnm.value)||'_ora_'||oracle_process_id||'.trc',
'Prog. Name: '||prog.user_concurrent_program_name,
'File Name: '||execname.execution_file_name|| execname.subroutine_name ,
'Status : '||decode(phase_code,'R','Running')
||'-'||decode(status_code,'R','Normal'),
'SID Serial: '||ses.sid||','|| ses.serial#,
'Module : '||ses.module
from fnd_concurrent_requests req, v$session ses, v$process proc,
v$parameter dest, v$parameter dbnm, fnd_concurrent_programs_vl prog,
fnd_executables execname
where req.request_id = &request_id
and req.oracle_process_id=proc.spid(+)
and proc.addr = ses.paddr(+)
and dest.name='user_dump_dest'
and dbnm.name='db_name'
and req.concurrent_program_id = prog.concurrent_program_id
and req.program_application_id = prog.application_id
and prog.application_id = execname.application_id
and prog.executable_id=execname.executable_id;
3. Enable profile ‘Initialization SQL Statement – Custom’
This method should be used when there is requirement to capture trace for processes in related products like INV, OM, WIP etc. initiated by Receiving Transaction Processor. This method enables and Event 10046 Level 12 database trace for the entire session
of the user for whom the profile is enabled. The session can be linked to an online Form, a Concurrent Program, or any other piece of code that requires accessing the database. Hence, this method must be used carefully as it can generate many trace files
as user navigates through the applications.
Steps to generate trace file :
- Enable trace for a specific user:
- Bring up the Core application - System Administrator responsibility
- Move to Profile/System
- Check off the USER box - and enter the username of the user for whom trace needs to be enabled
- Search on the following profile option - 'Initialization SQL Statement - Custom'
- Please set this at the user level with the following string:
BEGIN FND_CTL.FND_SESS_CTL('','', '', 'TRUE','','ALTER SESSION SET TRACEFILE_IDENTIFIER='||''''||'RCVTRACE' ||''''||' EVENTS ='||''''|| '10046 TRACE NAME CONTEXT FOREVER, LEVEL 12 '||''''); END;
- # 1. Cut and paste the above sql statement into the profile value editor. This must be one complete line of text - so may be best to copy the string into notepad prior to putting it into the profile and making sure that there are no special
characters in the string.
# 2. String 'RCVTRACE' in the above statement can be changed to any user-defined value. This is the string that will be included in the filename and will help in identifying all the trace files related to a session.
- Once the profile is set, please change responsibilities and directly go and reproduce the problem.
Error message will be displayed on the form only in online mode. In Immediate / Batch mode, the error will be recorded in the concurrent request log file of Receiving Transaction Processor.
Location of the trace file:
- Locate the trace file using the following sql in sqlplus. The value is the location of the trace file on the database server
select name, value from v$parameter where name like 'user_dump_dest';
FORM级别和数据库级别的Trace的更多相关文章
- 实例级别和类级别的static、构造函数、字段属性的简单介绍
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace 实例级别 ...
- SQLServer性能优化之---数据库级日记监控
上节回顾:https://www.cnblogs.com/dotnetcrazy/p/11029323.html 4.6.6.SQLServer监控 脚本示意:https://github.com/l ...
- hibernate5学习之理解数据库级并发
本文作者:苏生米沿 本文地址:http://blog.csdn.net/sushengmiyan/article/details/50551741 当我们谈起隔离的时候,我们总是假定两个物体直接要么隔 ...
- SQL SERVER数据库级的触发器
CREATE TRIGGER [Object_Change_Trigger_DDL] ON database FOR DROP_TABLE AS DECLARE @EventData AS xml; ...
- Django Form 实时从数据库中获取数据
修改 models.py 添加 class UserType(models.Model): caption = models.CharField(max_length=32) 执行命令,生成数据库 p ...
- pytest_用例运行级别_模块级
''' pytest 参数说明 https://www.jianshu.com/p/7a7432340f02 -x test_fixt_model.py 遇到错误时,停止运行 用-v运行(-v显示运行 ...
- 06.SQLServer性能优化之---数据库级日记监控
汇总篇:http://www.cnblogs.com/dunitian/p/4822808.html#tsql 之前说了一下数据库怎么发邮件:http://www.cnblogs.com/duniti ...
- pytest_用例运行级别_函数级
''' 函数级(setup_function/teardown_function只对函数用例生 效(不在类中)在类中是用该方法不生效 ''' import pytest def setup_mod ...
- 【事务隔离级别】数据库事务隔离级别-UNDERSTANDING ISOLATION LEVELS
参考链接:ISOLATION LEVELS ISOLATION LEVELS In a database system, concurrent transactions are processed i ...
随机推荐
- ●洛谷P2606 [ZJOI2010]排列计数
题链: https://www.luogu.org/problemnew/show/P2606题解: 组合数(DP),Lucas定理 首先应该容易看出,这个排列其实是一个小顶堆. 然后我们可以考虑dp ...
- Codeforces Round #397 by Kaspersky Lab and Barcelona Bootcamp (Div. 1 + Div. 2 combined)
运气好,分到的房里我最先开始Hack C题,Hack了12个,听说F题沙雕莫队但我不会,最后剩不到15分钟想出E题做法打了一波结果挂了,最后虽然上分了但总有点不甘心. 最后A掉ABCD Hack+12 ...
- bzoj 2435: [Noi2011]道路修建
Description 在 W 星球上有 n 个国家.为了各自国家的经济发展,他们决定在各个国家 之间建设双向道路使得国家之间连通.但是每个国家的国王都很吝啬,他们只愿 意修建恰好 n – 1条双向道 ...
- hdu 5656 CA Loves GCD(n个任选k个的最大公约数和)
CA Loves GCD Accepts: 64 Submissions: 535 Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 2 ...
- hdu 4052 线段树扫描线、奇特处理
Adding New Machine Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Othe ...
- SQL优化实用方法
SQL优化:避免索引失效 1.不使用NULL 任何在where子句中使用is null或is not null的语句优化器是不允许使用索引的.因为只有该字段中有null值,即使创建了索引其实也是没有用 ...
- 修改firefox的默认缩放比
我们在使用firefox时,发现页面的缩放比只能一个一个手动调整,当跳转到新的页面时默认缩放比又还原了,这个时候又要重新调整,相当不方便. 下面介绍修改默认缩放比的方法: 首先,打开firefox,然 ...
- P2P技术详解(一):NAT详解——详细原理、P2P简介
1. IPv4协议和NAT的由来 今天,无数快乐的互联网用户在尽情享受Internet带来的乐趣.他们浏览新闻,搜索资料,下载软件,广交新朋,分享信息,甚至于足不出户获取一切日用所需.企业利用互联网发 ...
- Spring消息之JMS.
一.概念 异步消息简介 与远程调用机制以及REST接口类似,异步消息也是用于应用程序之间通信的. RMI.Hessian.Burlap.HTTP invoker和Web服务在应用程序之间的通信机制是同 ...
- Gradle入门--基本配置
Gradle配置: Gradle构建脚本 build.gradle Gradle属性文件 gradle.properties Gradle设置文件 settings.gradle build.grad ...