Re: How to get the 'SQL query' which is blocking rows

From: Mladen Gogala <mgogala_at_yahoo.com>
Date: Fri, 9 Jan 2009 19:30:18 +0000 (UTC)
Message-ID: <gk88ka$p3v$3_at_ss408.t-com.hr>



On Fri, 09 Jan 2009 17:58:16 +0100, Gerard H. Pille wrote:

>> What are my options here? Using blockers SID can we get all the sql
>> queries issued by that blocking session from ASH then locate sql
>> issuing locks (update/select for update/delete)??? Does any ASH views
>> store sid along with sql queries?
>>
>> thanks,
>> Uday

>
> check the open cursors of the blocker?

Locks are held by transactions, not by statements. Locks can be caused by the statement that is no longer executing. One cannot go below the level of the transaction, nor should one. The "A" in "ACID" comes from "atomicity". A session can only execute one transaction at any given time, so the transaction is uniquely determined by the ID of the blocking session.

-- 
http://mgogala.freehostia.com
Received on Fri Jan 09 2009 - 13:30:18 CST

Original text of this message