zoukankan      html  css  js  c++  java
  • (转)How To Kill runaway processes After Terminating Concurrent Request

      Every concurrent Request uses some resources for running. If we find that the concurrent request is taking long time and decided to terminate the concurrent request , the resources may not be released soon. These processes are called runaway processes. So we need to manually kill the processes at database and os level to have the resources released to the system. Terminate the concurrent request from the front end. Then

    SQL>select request_id,oracle_process_id,os_process_id from fnd_concurrent_requests   
    where request_id=&Req_Id’;   
    SQL>select p.spid , s.sid , s.serial# from v$session s , v$process p   
    where s.paddr = p.addr and s.process = &os_process_id ;   
    SQL> alter system kill session ‘session-id,session-serial’ $ kill -9 <server pid>  
    Complete details about the request can be found using the following query :
    SELECT   qt.user_concurrent_queue_name ,  
             fcr.Request_Id Request_id     ,  
             fu.User_name                  ,  
             p.spid                        ,  
             s.sid  
                      ||’,  
             ‘  
                      || s.serial# SIDSERIAL ,  
             SUBSTR( Fcpv.Concurrent_Program_Name  
                      ||’ – ‘  
                      || Fcpv.User_Concurrent_Program_Name, 1,46) Program           ,  
             TO_CHAR( fcr.actual_start_date, ‘mm/dd hh24:mi’ )    actual_start_date ,  
             phase_code                                                             ,  
             status_code                                                            ,  
             TO_CHAR( TRUNC(SYSDATE) + ( SYSDATE – fcr.actual_start_date ) , ‘hh24:mi:ss’ ) duration  
    FROM     apps.Fnd_Concurrent_Queues Fcq     ,  
             apps.fnd_concurrent_queues_tl qt   ,  
             apps.Fnd_Concurrent_Requests Fcr   ,  
             apps.Fnd_Concurrent_Programs Fcp   ,  
             apps.Fnd_User Fu                   ,  
             apps.Fnd_Concurrent_Processes Fpro ,  
             v$session s                        ,  
             v$process p                        ,  
             apps.Fnd_Concurrent_Programs_Vl Fcpv  
    WHERE    phase_code              = ‘C’  
    AND      status_Code             = ‘X’  
    AND      s.paddr                 = p.addr  
    AND      fcr.requested_by        = user_id  
    AND      fcq.application_id      = qt.application_id  
    AND      fcq.concurrent_queue_id = qt.concurrent_queue_id  
    AND      userenv(’lang’)         = qt.language  
    AND      fcr.os_process_id       = s.process  
    AND      fcr.Controlling_Manager = Concurrent_Process_Id  
    AND  
             (  
                      fcq.concurrent_queue_id = fpro.concurrent_queue_id  
             AND      fcq.application_id      = fpro.queue_application_id  
             )  
    AND  
             (  
                      fcr.concurrent_program_id  = fcp.concurrent_program_id  
             AND      fcr.program_application_id = fcp.application_id  
             )  
    AND  
             (  
                      fcr.concurrent_program_id  = fcpv.concurrent_program_id  
             AND      fcr.program_application_id = fcpv.application_id  
             )  
  • 相关阅读:
    LightOJ1214Large Division大数取余
    LightOJ1259Goldbach`s Conjecture素数打表+判断素数对数
    LightOJ1341Aladdin and the Flying Carpet 唯一分解定理 + 素数筛选
    素数判定
    HDU1492The number of divisors(约数) about Humble Numbers 求因子总数+唯一分解定理的变形
    HDU6375度度熊学队列双端队列deque/list
    LightOJ1234Harmonic Number调和级数+欧拉常数 / 直接打表
    UVA699The Falling Leaves二叉树+递归
    51nod1130N的阶乘的长度V2(斯特林近似)套斯特林公式
    LightOJ1138Trailing Zeroes (III)二分+求N!末尾0
  • 原文地址:https://www.cnblogs.com/toowang/p/3919378.html
Copyright © 2011-2022 走看看