设为首页 收藏本站
查看: 1594|回复: 0

[经验分享] Oracle EBS环境下查找数据源(OAF篇)

[复制链接]

尚未签到

发表于 2019-2-3 12:29:27 | 显示全部楼层 |阅读模式
  在OAF页面的查找后台的数据源相对于在Form中显得更加麻烦,同时也无法像Form中那样能够较为准确的定位,但是也能够查找出大部分的内容。
  本文介绍如何使用OAF提供的诊断功能来快速查找OAF页面对应的数据库对象:

  • 关于本页功能(About this Page)
  • SQL Trace功能
  一、使用关于本页功能(About this Page)
  前提:在用户层设置预制文件:Personalize Self-Service Defn 的值为Yes 来启动个性化模式
  步骤:

  • 点击OAF页面左下角的“About this Page”链接
  • 进入关于页面中,展开Page Definition部分的页面结构,页面的结构会随着页面定义有所不同
  • 或者选择Business Component References Details部分中的View Object定义
  • 查看View Object列中的信息,组件引用的视图对象会有链接,直接点击链接进入视图对象页面
  • 视图对象详细信息中的SQL就是创建视图对象的语句,查看它就可以知道页面组件对应的后台数据源
  • 通过选择不同的视图对象查看对应的定义
  实例(找出PO Document Types页面中对应的后台数据库对象):

  • 点击Document Types页面左下角的About this Page链接

  • 进入About Page页面后,展开页面定义部分为如下的结构

  • 点击PoAllDocumentTypesVO视图对象链接进入视图对象定义详细页面

  • 另外也可以在About Page页面中展开Business Component References Details,然后选择下面的视图对象:oracle.apps.po.setup.server.PoAllDocumentTypesVO

  • 通过视图对象详细页面可以得到SQL
  view plaincopy to clipboardprint?

  • SELECT podocumenttypeseo.document_type_code,
  •        podocumenttypeseo.org_id,
  •        podocumenttypeseo.document_subtype,
  •        podocumenttypeseo.document_template_code,
  •        podocumenttypeseo.contract_template_code,
  •        xtv1.template_name AS document_types_layout,
  •        xtv2.template_name AS contract_terms_layout,
  •        plc1.displayed_field || ' ' || plc2.displayed_field AS TYPE,
  •        decode(podocumenttypeseo.document_type_code,
  •               'RFQ',
  •               decode(podocumenttypeseo.document_subtype,
  •                      'STANDARD',
  •                      'DeleteDisabled',
  •                      'CATALOG',
  •                      'DeleteDisabled',
  •                      'BID',
  •                      'DeleteDisabled',
  •                      'DeleteEnabled'),
  •               'QUOTATION',
  •               decode(podocumenttypeseo.document_subtype,
  •                      'STANDARD',
  •                      'DeleteDisabled',
  •                      'CATALOG',
  •                      'DeleteDisabled',
  •                      'BID',
  •                      'DeleteDisabled',
  •                      'DeleteEnabled'),
  •               'DeleteDisabled') AS delete_switcher,
  •        podocumenttypeseo.type_name
  •   FROM po_document_types_all_vl podocumenttypeseo,
  •        xdo_templates_vl         xtv1,
  •        xdo_templates_vl         xtv2,
  •        po_lookup_codes          plc1,
  •        po_lookup_codes          plc2
  • WHERE xtv1.template_code(+) = podocumenttypeseo.document_template_code
  •    AND xtv2.template_code(+) = podocumenttypeseo.contract_template_code
  •    AND podocumenttypeseo.document_type_code = plc1.lookup_code
  •    AND plc1.lookup_type = 'DOCUMENT TYPE'
  •    AND podocumenttypeseo.document_subtype = plc2.lookup_code
  •    AND plc2.lookup_type = decode(podocumenttypeseo.document_type_code,
  •                                  'REQUISITION',
  •                                  'REQUISITION TYPE',
  •                                  'RFQ',
  •                                  'RFQ SUBTYPE',
  •                                  'QUOTATION',
  •                                  'QUOTATION SUBTYPE',
  •                                  'DOCUMENT SUBTYPE')
  •    AND podocumenttypeseo.org_id = :1
SELECT podocumenttypeseo.document_type_code,podocumenttypeseo.org_id,podocumenttypeseo.document_subtype,podocumenttypeseo.document_template_code,podocumenttypeseo.contract_template_code,xtv1.template_name AS document_types_layout,xtv2.template_name AS contract_terms_layout,plc1.displayed_field || ' ' || plc2.displayed_field AS TYPE,decode(podocumenttypeseo.document_type_code,'RFQ',decode(podocumenttypeseo.document_subtype,'STANDARD','DeleteDisabled','CATALOG','DeleteDisabled','BID','DeleteDisabled','DeleteEnabled'),'QUOTATION',decode(podocumenttypeseo.document_subtype,'STANDARD','DeleteDisabled','CATALOG','DeleteDisabled','BID','DeleteDisabled','DeleteEnabled'),'DeleteDisabled') AS delete_switcher,podocumenttypeseo.type_nameFROM po_document_types_all_vl podocumenttypeseo,xdo_templates_vl         xtv1,xdo_templates_vl         xtv2,po_lookup_codes          plc1,po_lookup_codes          plc2WHERE xtv1.template_code(+) = podocumenttypeseo.document_template_codeAND xtv2.template_code(+) = podocumenttypeseo.contract_template_codeAND podocumenttypeseo.document_type_code = plc1.lookup_codeAND plc1.lookup_type = 'DOCUMENT TYPE'AND podocumenttypeseo.document_subtype = plc2.lookup_codeAND plc2.lookup_type = decode(podocumenttypeseo.document_type_code,'REQUISITION','REQUISITION TYPE','RFQ','RFQ SUBTYPE','QUOTATION','QUOTATION SUBTYPE','DOCUMENT SUBTYPE')AND podocumenttypeseo.org_id = :1  二、使用SQL Trace功能
  只要发生数据库操作,都可以使用SQL Trace功能来跟踪数据库操作统计,OAF页面中也需要进行数据库的增删查操作,因此可以可以使用它来跟踪。
  前提:在用户层设置预制文件:FND: Diagnostics 的值为Yes,进入诊断模式
  步骤

  • 选择Diagnostic为Set Trace Level,点击Go按钮
  • 设置SQL Trace的级别
  • 进入OAF页面中进行操作,并保证操作有查询、插入、更新或删除动作
  • 操作完成后,再次进入关闭Trace模式,记录生成的Trace>
  • 以数据库操作系统用户,如ora02登陆数据库服务器
  • 使用Tkprof工具格式化Trace结果文件输出
  • 查看被格式化过的Trace文件
  • 得出数据源
  实例:

  • 以系统管理员职责,在用户层设置预制文件:FND: Diagnostics 的值为Yes,进入诊断模式

  • 以预置文件设置的同一用户登录首页,在页面的顶部点击Global按钮 Diagnostics

  • 根据需要,选择Trace打头的几个选项来进入SQL Trace模式,点击Save按钮

  • 进入PO Document Types页面更新Forward Method后保存

  • 再次进入Diagnostics关闭Trace,记录下生成的最后一个Trace>
  • 使用下面的SQL查询出trace文件的路径  SELECT value
      FROM v$parameter
      WHERE name = ‘user_dump_dest’;
      VALUE
      ———————————————————————–
      /d02/db/tech_st/11.1.0/admin/VIS02_ebs006/diag/rdbms/vis02/VIS02/trace
  • 以数据库操作系统用户(ora02)Telnet到数据库服务器,运行如下命令  [ora02@ebs006 ~]$ cd /d02/db/tech_st/11.1.0/admin/VIS02_ebs006/diag/rdbms/vis02/VIS02/trace
      [ora02@ebs006 trace]$ ls -al *16456*
      -rw-r–r– 1 ora02 dba 116421 Aug 11 17:48 16456_234_1.output
      -rw-r–r– 1 ora02 dba 502101 Aug 11 17:35 VIS02_ora_16456_234.trc
      -rw-r–r– 1 ora02 dba 17288 Aug 11 17:35 VIS02_ora_16456_234.trm
      [ora02@ebs006 trace]$ tkprof VIS02_ora_16456_234.trc 16456_234_1.output
  • 上面命令生成16456_234_1.output文件,从服务器下载文件后,找出文件中的UPDATE语句,其中对ICX类型的更新动作无需关注,16456_234_1.output文件样例
  • 找到如下的UPDATE语句
    UPDATE po_document_types_all_b podocumenttypeeo  

  •    SET last_update_date     = :1,
  •        last_updated_by      = :2,
  •        forwarding_mode_code = :3,
  •        last_update_login    = :4
  • WHERE org_id = :5
  •    AND document_type_code = :6
  •    AND document_subtype = :7


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-671293-1-1.html 上篇帖子: 如何把数据上传到EBS的forms的数据块中 下篇帖子: EBS FORM 删除编译信息
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表