query hangs oracle 10g

前端 未结 1 509
轮回少年
轮回少年 2021-02-19 11:51

I have this strange issue with our software. Is is on production for 5 years and we had no such problems...

Problem:

We have a spring job (scheduler) which makes

1条回答
  •  我在风中等你
    2021-02-19 12:17

    First thing, when this query hangs, check V$SESSION_WAIT to see what the session is waiting on.

    Second observation: The code you've shown above appears to ignore the max parameter unless the benefitType parameter is non-null. Is this intentional? Is it possible that the query is "hanging" only when the benefitType parameter is null?

    Sorry, I assumed you had some way of identifying the correct session within Oracle. Try a query like this:

    select v2.sid,
           v2.module,
           substr(v1.sql_text,1,180) sql_text,
           v1.rows_processed,
           v2.event,
           v2.seq#
    from v$sqlarea v1, v$session v2
    where v1.users_executing > 0
      and v2.sql_address (+) = v1.address;
    

    That will show all the SQL currently being executed, and if possible the related session ID and what event it is waiting on. You should be able to use the SQL text to identify the session you are interested in.

    0 讨论(0)
提交回复
热议问题