how to view the current sql queries that the current user is firing?
how can i view this using v$sql view
gopu
Printable View
how to view the current sql queries that the current user is firing?
how can i view this using v$sql view
gopu
use the following
select sql_text,last_load_time from v$sql where
last_load_time = (select max(last_load_time) from v$sql)
Try this in 10g:
set lines 101 pages 10000
col sql_fulltext for a76 word_wrapped
col last_load_time for a22
select last_load_time, sql_fulltext
from v$SQL
order by 1 desc
/
You guys are not answering OP's question.
Providing you know the username of the user you want to track you might want to try:
Code:select a.username,
b.last_load_time,
b.sql_text
from v$session a,
v$sql b
where a.username = 'USERNAME_YOU_WANT_TO_TRACK'
and a.sql_address = address
order by b.last_load_time desc
;