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:

  1. Navigate to the point in the application right before you are experiencing the problem.
  2. Turn trace on by: Help > Diagnostics > Trace > Trace with Binds (May require password)
  3. A pop-up message with trace file location and name will be displayed. Note the filename and path.
  4. Duplicate the error and then stop immediately afterwards.
    Help > Diagnostics > Trace > No Trace
  5. Retrieve trace file from the user_dump_dest, which can be located as follows:
    select value from V$PARAMETER where name like 'user%';
  6. 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>
Only if tracing for a performance issue on the form, enable trace with binds and waits.

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:

  1. 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'
  2. 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.
  3. Unset the profile before logging off the applications.

Location of the trace file:

  1. 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%';
  1. 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:

  1. 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
  2. Change responsibilities and directly go and reproduce the problem. In this method, the error message, if any, will not be displayed on the form.
  3. 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:'
promptcolumn 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 offSELECT '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 :

  1. 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.

  1. 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:

  1. 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';

Please move to this directory and search for the file having RCVTRACE (or any user-defined value that was specified in the profile value statement) in the filename. There may be more than one trace file created for the session.
Ensure that the profile option is unset before exiting the Application. This is a very important step. If this is not unset, unnecessary trace files will be generated.

转载于:https://www.cnblogs.com/wanghang/p/6299392.html

FORM级别和数据库级别的Trace相关推荐

  1. SQL Server中的角色(服务器级别和数据库级别角色)

    参考文献 http://msdn.microsoft.com/zh-cn/library/ms188659.aspx 服务器级别角色 为帮助您管理服务器上的权限,SQL Server 提供了若干角色. ...

  2. 表级触发器不支持ddl语句_表上的数据库级DDL触发器

    表级触发器不支持ddl语句 This article portrays the different utilization of database DDL Triggers for the Table ...

  3. 表级触发器不支持ddl语句_用于视图,过程和函数的数据库级DDL触发器

    表级触发器不支持ddl语句 In this article, we will un-riddle the ways to make use of the data definition languag ...

  4. mysql转dm7_DM7 达梦数据库 数据库级 数据复制(DATA REPLICATION) 搭建手册

    在之前的博客我们做了DM 数据复制的几个测试:: DM 的数据复制可以在表级,模式级和库级进行配置,并且根据官方文档的说明,模式级别是支持DDL复制的,但之前的测试并不成功,所以本篇我们测试下数据库级 ...

  5. 如何构建千万用户级别 后台数据库架构设计的思路

    关于如何构建千万级别用户的后台数据库架构话题,在ITPUB及CSDN论坛都有不少网友提问,新型问答网站知乎上也有人提问,并且顺带梳理了下思路,方便更多的技术朋友有章可循,整理一篇抛砖引玉性的文章. 一 ...

  6. mysql数据 锁 隔离级别_MySQL数据库事务各隔离级别加锁情况--read uncommitted篇

    1.目的 1.1 合适人群 1.数据库事务特征我只是背过,并没有很深刻的理解. 2.数据库事务的隔离级别只是了解,并没有深刻理解,也没有在实际工作中体验使用过. 3.经常面试被人问起数据库加锁情况,一 ...

  7. 数据库级别的MD5加密(建议收藏)

    数据库级别的MD5加密 ​ MD5消息摘要算法是一种广泛使用的散列函数,它产生128-比特哈希值.尽管MD5最初被设计为用作加密散列函数,但已经发现它存在广泛的漏洞.它仍然可以用作校验和核实数据完整性 ...

  8. Spring事务隔离级别与数据库隔离级别不一致时,该以谁为准?

    原创博文,欢迎转载,转载时请务必附上博文链接,感谢您的尊重. 前言 通过本篇,你将了解到[Spring事务]与[数据库事务]的关系,以及优先级问题,我将为你一一论证. 阅读本篇,你可能会需要的博文: ...

  9. MySQL——数据库级别的MD5加密应用

    数据库级别的MD5加密 MD5信息摘要算法 MD5算法因其普遍.稳定.快速的特点,仍广泛应用于普通数据的加密保护领域 -- =====================测试MD5加密========== ...

最新文章

  1. spring学习12 -Spring 框架模块以及面试常见问题注解等
  2. 从FCKEDITOR到ckeditor(二) 撰写自定义对话框,增加数学公式(与webEq的结合)
  3. 批量过滤删除AD中的对象
  4. Akka2使用探索1(Remoting)
  5. php Closure 类型
  6. Failed to import pydot
  7. 360Stack裸金属服务器部署实践
  8. linux执行使分区生效的命令,Linux硬盘分区生效命令partprobe
  9. Innodb内核线程并发机制
  10. PARDISO 5.0.0 Solver Project
  11. [转] PostgreSQL的PITR技术(Point-In-Time-Recovery)
  12. 整人程序源码(VB)
  13. 导航网站合集 | 你想要的资源它都有
  14. matlab子函数中使用全局变量的使用方法
  15. 一个由2020年1月7日 京东出现的重大 Bug 漏洞引起的思考...
  16. 建网站域名服务器那个好,如何选择好建网站的域名?
  17. 栋的周评 | 第二回合(定期更新、动态、架构、云技术、后端、前端、收听/收看、英文、哲学、书籍、影视、好歌、新奇)
  18. 基于macos M1 python3.8的tensorflow安装(简单方便几步完成)
  19. Ip可视一键对讲机特点
  20. 2.4g和5g要不要合并_路由器WiFi的2.4g和5g要不要合并?

热门文章

  1. 朋友在征信太烂没法办贷款,先买在我名下再过户是否行得通?
  2. 假如购买的期房不小心烂尾了,那银行贷款是否可以不还了?
  3. Vivado抓取信号
  4. 逾期了,如何消除不良记录?
  5. 简化从Win32到Windows 10的迁移之路
  6. Windows Azure SDK 1.6让Visual Studio下的Azure开发更高效
  7. tomcat temp 大量 upload 文件_原创 | 浅谈URI中的任意文件下载
  8. python递归函数的思想_Python递归函数实例讲解
  9. redistemplate注入为null_Windows DLL 注入技术
  10. 计算机一级b需要学哪些,希望通过江苏省计算机一级B考试的同学千万要看哦!江苏省计算机一级B理论复习资料(绝密资料)...