Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to get the SQL query of a blocking sid during a lock contention

Re: How to get the SQL query of a blocking sid during a lock contention

From: <bchorng_at_yahoo.com>
Date: 12 Jul 2005 12:30:55 -0700
Message-ID: <1121196655.952798.320380@g14g2000cwa.googlegroups.com>


Try prev_hash_value. sql_hash_value is 0 when the sql is already completed.

I am suspecting the blocker is also waiting for something, or the hash_value shouldn't be 0.

You can find out what the blocker is doing from v$session_wait.

Another way to find out sql_text is via sql_address. Use this script see if it makes any difference:

column addr new_value addr;
select sql_address addr
from v$session
where sid=&sid;

select sql_text from
sys.v_$sqltext
where address = hextoraw('&addr')
order by piece; Received on Tue Jul 12 2005 - 14:30:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US