Reverse engineer SQL_TEXT from SQL_ID?

From: Steve Howard <stevedhoward_at_gmail.com>
Date: Tue, 23 Feb 2010 06:25:42 -0800 (PST)
Message-ID: <af41de1f-53ed-41f7-802a-4f501179d986_at_c2g2000vbl.googlegroups.com>



10.2.0.3 64 bit Standard on SLES 10 two node RAC

Hi All,

Does anyone know if it is possible to reverse engineer the SQL_TEXT for a given SQL_ID? We had large waits yesterday afternoon on 'enq: HW contention'. I found the SQL_ID in DBA_HIST_ACTIVE_SESS_HISTORY that was being executed when the event was posted. I also found the current_obj# for the sessions in the same view, but I don't know why it would be waiting on this event. However, there is no SQL recorded in DBA_HIST_SQLTEXT, which makes me wonder if it was DDL. However, there is nothing in DBA_OBJECTS with a DDL time in the last 24 hours.

I would really like to look at the SQL if possible. Is there any way to do this?

Thanks,

Steve Received on Tue Feb 23 2010 - 08:25:42 CST

Original text of this message