How to monitor query in Oracle [message #61730] |
Fri, 21 May 2004 10:30 |
Anton Mironenko
Messages: 1 Registered: May 2004
|
Junior Member |
|
|
We have the following problem:
Java client sends through JDBC INSERT query using batch,
and sometimes this query hangs.
In V$SESSION ACTIVE session appears, which remains ACTIVE forever.
Also locked object appears in V$LOCKED_OBJECT and open coursor.
How to know what happens inside the query? Why it hangs?
|
|
|
Re: How to monitor query in Oracle [message #61771 is a reply to message #61730] |
Wed, 26 May 2004 07:05 |
Ken Jones
Messages: 70 Registered: January 2004
|
Member |
|
|
Set SQL_TRACE = TRUE in init.ora and bounce the db. this will create trace files which can be deciphered by tkprof. These files will then give you lots of info about exactly what your transaction/sql is doing. Switch it off pretty quickly though as it produces lots of files.
If it is a production dataserver then SQL_TRACE = TRUE can be set at the session level.
|
|
|