• 根据请求号(request ID)查找正在运行的sql


    --下面的SQL可以根据Request ID找到对应的Session信息:

    select *

    from v$session

    where paddr in

    (select addr

    from v$process

    where spid =

    (select b.oracle_process_id

    from apps.fnd_concurrent_requests b

    where b.request_id = &req_number))

     

    --或者进一步找到正在运行的SQL:

    select sql_text

    from v$sqltext_with_newlines

    where hash_value in

    (select SQL_HASH_VALUE

    from v$session

    where paddr in

    (select addr

    from v$process

    where spid =

    (select b.oracle_process_id

    from apps.fnd_concurrent_requests b

    where b.request_id = &req_number)))

    order by piece;

     

    --通过request id sql id找到相关脚本

    SELECT ses.sid,

            ses.serial# ,

            Ses.sql_id

         FROM v$session ses,

            v$process pro

            WHERE ses.paddr = pro.addr

                 AND pro.spid IN (SELECT oracle_process_id

                      FROM fnd_concurrent_requests

                      WHERE request_id = <request_id>);

    select sql_text from v$sqltext where sql_id='0kkhhb2w93cx0' order by piece

  • 相关阅读:
    周总结三
    重大技术需求系统四
    重大技术需求系统三
    重大技术需求系统二
    重大技术需求系统
    周总结(二)
    MJExtension框架介绍
    iOS 中捕获程序崩溃日志
    又是一年1111
    NSAssert的使用
  • 原文地址:https://www.cnblogs.com/quanweiru/p/9128161.html
Copyright © 2020-2023  润新知