Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> The last executed sql statement
To obtain the last executed SQL statement on Oracle 7.3 server I used
the following SQL statement:
SELECT t2.sql_text,
t2.piece FROM v$session t1, v$sqltext t2 WHERE t1.audsid = Userenv('SESSIONID') AND t2.address = t1.prev_sql_addr AND t2.hash_value = t1.prev_hash_value ORDER BY 2;
But it does not work on Oracle 8.0.5 because of v$session.prev_sql_addr has the same value that v$session.sql_address. Has someone an idea how to get the last executed SQL statement on Oracle 8.0.5?
Any advice greatly appreciated.
Best regards,
Alex Nikiforenko.
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Nov 24 1999 - 09:26:44 CST
![]() |
![]() |