how to view the current sql queries?
how to view the current sql queries that the current user is firing?
how can i view this using v$sql view
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
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:
from v$session a,
where a.username = 'USERNAME_YOU_WANT_TO_TRACK'
and a.sql_address = address
order by b.last_load_time desc
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Click Here to Expand Forum to Full Width