How to catch sql in fly? [message #55551] |
Fri, 31 January 2003 00:32 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Julia
Messages: 30 Registered: December 1999
|
Member |
|
|
Hi, I'm talking about 8 and 8i, we are having performance issues with the vendor's software. Some of the troubled SQLs are either generated in fly or we don't have access to the source code at all. So my question is how can I catch the SQLs in fly, what is the most, relatively, efficient way?
your help is much appreciated,
Julia
|
|
|
Re: How to catch sql in fly? [message #55559 is a reply to message #55551] |
Fri, 31 January 2003 07:34 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
N.A. Jam
Messages: 23 Registered: January 2003
|
Junior Member |
|
|
A way to see which statements are being used by a session is check the session's open cursors. If you know the session id, try using this query:
SELECT A.SQL_TEXT
FROM V$SQLAREA A, V$OPEN_CURSOR B
WHERE B.SID = &SID
AND A.ADDRESS = B.ADDRESS
/
(You may need to adjust long size to see the complete text.)
I hope your performance problems "buzzes" off ;-)
|
|
|
Re: How to catch sql in fly? [message #55619 is a reply to message #55551] |
Tue, 04 February 2003 15:05 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
george rose
Messages: 1 Registered: February 2003
|
Junior Member |
|
|
You might want to run the statspack utility
over an interval of time when the application is running. Metalink has install and use instructions, search on statspack, and the spreportmod.sql will display module names next to the most resource intensive sql in the report.
This will show any sql in flight, and possibly
flies and other bugs in the sql as well.
---
George
|
|
|