Last time of statement execution [message #329912] |
Fri, 27 June 2008 01:11 |
srini_thiru
Messages: 133 Registered: May 2008
|
Senior Member |
|
|
Hi to all,
I like to know the time of the last executed statement by a session.
For example,
user1 has logged on to the database by the time '25-jun-08 13:25:00'. Now the time is '26-jun-08 22:15:30'. whether can i get the information when he has executed the last statement.
Any dynamic views to view this..
thanks in advance,
Seenu
|
|
|
|
|
Re: Last time of statement execution [message #331912 is a reply to message #329915] |
Sun, 06 July 2008 09:55 |
srini_thiru
Messages: 133 Registered: May 2008
|
Senior Member |
|
|
Hi,
I found the answer to my question.
One can Find when the particular user has executed the last statement by using the below query.
select sid,username,floor(last_call_et/60) "Activity in Minutes"
from v$session;
The column "Activity in Minutes" will show time of the user's activity in the database in minutes.
Thanks & Regards,
Seenu
|
|
|
Re: Last time of statement execution [message #331920 is a reply to message #331912] |
Sun, 06 July 2008 10:41 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
This is not true.
If the session is active this shows how much time the last call lasts
If the session is not active this shows how much idle time since the last call.
A call is NOT a statement, it is a part of it.
Regards
Michel
|
|
|