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:


  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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/260952.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

关于farpoint公司的控件:SPREAD for .NET Windows Forms Ed.的一些简单方法.

View Code using System;using FarPoint.Win.Spread ;using System.Drawing;using System.Windows.Forms;namespace DFO010{/// <summary>/// Fpspread的相关函数.2006/4/12 制作:Chouka/// </summary> public class Classspd {public Classspd() { }/// <su…

永远的beyond!(4 days left to get back touch)

永远的beyond!转载于:https://www.cnblogs.com/LaoLuo/archive/2012/03/05/2380954.html

串行总线协议笔记

I2C --INTER-IC串行总线的缩写&#xff0c;是PHILIPS公司推出的芯片间串行传输总线。它以1根串行数据线&#xff08;SDA&#xff09;和1根串行时钟线&#xff08;SCL&#xff09;实 现了双工的同步数据传输。具有接口线少&#xff0c;控制方式简化&#xff0c;器件封装形式小&a…

ibm服务器和微软,微软与IBM不得不说的事情

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼在Windows 3.x 开 始 为 世 人 接 受 之 初&#xff0c; 个 人 电 脑 的 操 作 系 统 中 唯 一 可 以 与Windows 操 作 系 统 分 庭 抗 礼 的 就 是OS/2。 这 套 原 先 是 微 软 与IBM 合 作 生 产 的 操 作 系 统&#xff0c; 由 …

[置顶] 程序员编程生产力相差10倍意味着什么?

在软件工程研究中&#xff0c;被验证得最多的结论就是对于同等经验的两个不同程序员&#xff0c;在效率和质量上可能会有10倍的差距。研究人员还发现&#xff0c;这种差距也适用于团队级别上&#xff0c;也就是说在同一行业内的不同的团队也是如此。 软件开发中的个人效率的变化…

生成随机长度字符串,比如密码等

2019独角兽企业重金招聘Python工程师标准>>> public function createstr( $length ) {$chars "abcdefghijklmnopqrstuvwxyz0123456789"; $str "";for ( $i 0; $i < $length; $i ) { $str. substr($chars, mt_rand(0, strlen($chars)-1), 1…

css margin属性,css margin属性怎么用?css margin属性用法教程

在css中&#xff0c;有一个重要的属性margin&#xff0c;很多人都不知道css margin属性是什么&#xff1f;怎么用&#xff0c;下面为您总结一下css margin属性用法教程。margin是css用于在一个声明中&#xff0c;对所有css margin属性的简写&#xff0c;正因为margin来控制css中…

对于.swp文件的恢复方法

今天在使用Secure CRT在局域网内远程服务器上编程时出了小状况。在文件没有保存的情况下&#xff0c;网线断了。 然后等我重连上去后发现&#xff0c;刚刚编写的程序不见了。用命令:ll 发现在目录下有一个同名的.xxxx.c.swp文件。 通过这个文件&#xff0c;可以恢复程序。 恢复…

bzoj1679[Usaco2005 Jan]Moo Volume 牛的呼声*

bzoj1679[Usaco2005 Jan]Moo Volume 牛的呼声 题意&#xff1a; N只牛&#xff0c;每只牛都与其他N-1只牛聊着天。一个对话的进行&#xff0c;需要两只牛都按照和她们间距离等大的音量吼叫&#xff0c;计算音量和。N≤10000 题解&#xff1a; 第i只牛与前i-1只牛对话的音量和是…

gaia引擎分析(二)场景管理

只是粗略的分析原理&#xff0c;大虾轻喷~~ Gaia引擎中没有场景管理器&#xff08;scenemanager&#xff09;这种东西&#xff0c;但是并不是没有场景管理&#xff0c;而是在cGameHost类中有一课场景树进行场景组织、一棵四叉树用来进行剪裁。 class cGameHost class cGameHos…

ajax登录非空判断,email ajax传输数据去重和非空判断(示例代码)

前台&#xff1a;ajax:$(document).ready(function(){$("#email").blur(function(){$("#email").css("background-color","#D6D6FF");$.ajax({type:"post",url:"check_email.do",data:{‘email‘:$("#email&…

某些专题页面内容很好,但很长时间都不被及时收录的可能原因之一

专题未被百度及时收录的问题&#xff0c;经检查验证后发现就是因为页面未建成就放置在线上&#xff0c;并返回404状态码&#xff0c;被百度当成死链删除&#xff0c;造成收录和流量损失。转载于:https://www.cnblogs.com/adu0409/p/3499350.html

C++.Templates学习总结归纳1

函数模板 首先我们来看看函数模板&#xff0c;一个函数模板&#xff08;function template&#xff09;代表一族函数&#xff0c;其表现和一般的函数一样&#xff0c;只是其中的某些元素在编写的时候还不知道&#xff0c;也就是说这些还不知道的元素&#xff0c;我们将其参数化…

选择更安全的方式执行你的puppet更新

选择更安全的方式执行你的puppet更新生产环境中&#xff0c;puppet的更新有需要节点自动更新的&#xff0c;有需要通过puppetmaster推送更新的&#xff0c;还有需要节点更新时间离散的。下面讲解三种更新方式2.7 Puppet更新方式2.7.1 节点定时更新[rootagent1 ~]# vim /etc/pup…

c ajax定时获取,ajax的定时调用每5秒调用一次

这篇文章主要介绍了关于ajax的定时调用&#xff0c;本例为每5秒调用一次&#xff0c;大家可以根据自己的需求更改代码如下:function initXMLRequest(){if (window.ActiveXObject) {xmlRequest new ActiveXObject("Microsoft.XMLHTTP");} else {if (window.XMLHttpRe…

[C++]有关深复制与copy constructor的一些问题与实例

纸上得来终觉浅&#xff0c;绝知此事要躬行 --- 今天对此话有了实际的领悟。之前学习C的时候&#xff0c;自以为已经把深复制和复制构造函数等这些知识已经掌握了&#xff0c;但真正写起项目来的时候&#xff0c;还是不能提前考虑这些问题&#xff0c;直到问题出现&#xff0c;…

Xml Tips

Xml Tips//z 2012-3-7 16:43:47 PM IS2120CSDN1. xml 中的注释<!-- 这是注释 -->并非用于 XML 分析器的内容&#xff08;例如与文档结构或编辑有关的说明&#xff09;可以包含在注释中。注释以 <!-- 开头&#xff0c;以 --> 结尾&#xff0c;例如<!--catalog la…

算法复杂度为O(N) 的排序算法

题目&#xff1a;某公司有几万名员工&#xff0c;请完成一个时间复杂度为O(n)的算法对该公司员工的年龄作排序&#xff0c;可使用O(1)的辅助空间。分析&#xff1a;排序是面试时经常被提及的一类题目&#xff0c;我们也熟悉其中很多种算法&#xff0c;诸如插入排序、归并排序、…

OpenJudge计算概论-字符串排序

/* 字符串排序 总时间限制: 1000ms 内存限制: 65536kB 描述 参考整数排序方法&#xff0c;设计一种为字符串排序的算法&#xff0c;将字符串从小到大输出 输入 第一行为测试数据组数t, 后面跟着t组数据。每组数据第一行是n&#xff0c;表示这组数据有n行字符串&#xff0c;接下…

Window7+vs2008+QT环境搭建

记录下自己是如何搭建QT开发环境的&#xff0c;备忘吧。操作系统&#xff1a;win7&#xff0c;其实winXP&#xff0c;win7都没有关系&#xff1b;我使用的机器安装的操作系统是win7&#xff1b;开发环境是VS&#xff0c;使用2005,2008,2010或者即将发布的2011都行&#xff1b;因…