Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> v$session
Hello everybody,
I would like to get the source for the last SQL statement.
I tried the following:
SELECT
st.piece,
st.sql_text
FROM
v$session sess,
v$sqltext st
WHERE
sess.prev_sql_addr=st.address
AND sess.prev_hash_value = st.hash_value --What is the difference
between sql_addr and hash_value???
AND sess.Username = user
ORDER BY
st.piece;
But this will only return the current SQL statement. So I
tried the following statement:
SELECT
sess.sql_address, sess.sql_hash_value, sess.prev_sql_addr, sess.prev_hash_value
And I get the following result set:
SQL_ADDR SQL_HASH_VALUE PREV_SQL PREV_HASH_VALUE
-------- -------------- -------- ---------------
023569DC -1.64E+09 023569DC -1.64E+09
It seems to me that the attributes SQL_ADDRESS and PREV_SQL_ADDR
have the same values. Did I miss something here?? Or does anybody what
is
wrong here??
Thanks in advance,
-Marco Koch
\\|// (o o) __________________________ooO-(_)-Ooo___________________________ /\ \ \_| Marco Koch Informatik |Received on Thu Dec 31 1998 - 00:00:00 CST
| Marco Koch Tel: +49-(0)761-73913 |
| Guenterstalstr.16 Tel: +49-(0)761-2020283 priv. |
| 79100 Freiburg Tel: +49-(0)761-203-8126 university |
| Germany |
| email: mkoch_at_privat.toplink.de |
| email: koch_at_informatik.uni-freiburg.de (university) |
| <http://www.informatik.uni-freiburg.de/~koch/> |
| ______________________.oooO___________________________________| \_/_____________________( )___Oooo.__________________________/ \ ( ( ) \_) ) / (_/
![]() |
![]() |