which kind of queries is the "test" user executing?
it wont give output when the user is executing "select" queries, where as it gave output when it uses "commit/insert" queries
I tested for both above.
thanks for replying,i tested the query mentioned above for both "commit and insert" queries,i m getting same result "no rows selected".why it is so?
Use V$SQLAREA instead of V$SQLTEXT
Hemant K Chitale
do you find user "TEST" in below query output?
select distinct username from v$session;
yes i find the username 'TEST'.when i executed
sql>select distinct name from v$session;
Both tables can be join , but with the right columns.
1) select * from v$session where username='TEST'
2) select * from v$sqltext where sql_text like '%<text>%';
3) think in what fields have in common and which ones could you use.
You are looking for a sql_id that was executed or has been executed 1 sec ago, not in that moment, so you have to compare with the prev_sql_id:
select a.username, b.sql_text from v$session a, v$sqltext b where b.sql_id=a.prev_ql_id and a.username='TEST';
i tried v$sqlarea,same result 'no rows selected'.
thanks to all,i got the result. my next issue is,is it also possible to see the last 20 sql queries executed by the user test?.your help appreciated.