Re: How to get the statment sql that caused the lock

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Mon, 29 Oct 2018 09:26:38 -0400
Message-ID: <d0f66c48-f5d0-dd28-06c8-c351e31ac2c1_at_gmail.com>



But why are you looking for that? If there is an active session blocking your transaction, you'll have to wait until that session ends its transaction. If the blocking session is idle, make note of the application that started the session, terminate the session with prejudice and a strong Austrian accent, and tell the developer who wrote the the application to fix the darned thing. Applications should never become idle while holding locks. Period.

On 10/29/18 7:39 AM, Eriovaldo Andrietta wrote:
> My purpose is to retrieve the sql_id related to the transaction line
> in the view v$transaction that is responsible for the execution of
> the  : INSERT, UPDATE, DELETE ... in order to show it to the developer
> and validate the application if need to add commit  in the code, if
> does not exists.
>
> I received a message from a member of the group , like this :
>
> I asked Oracle (SR 3-12200129251 : Request for ID of SQL responsible
> for transaction to be added to v$transaction) and they created an
> enhancement request
> Bug 24920354 : ADD SQL_ID COLUMN TO V$TRANSACTION OF THE SQL THAT
> STARTED THE TRANSACTION
>
> But two years have passed. They did nothing about it.
>
> This is what I am locking for.
>

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217


--
http://www.freelists.org/webpage/oracle-l
Received on Mon Oct 29 2018 - 14:26:38 CET

Original text of this message