Show when the current user was last active. : V_statname « System Tables Views « Oracle PL / SQL






Show when the current user was last active.

    

SQL>
SQL> select SID,TO_CHAR(SysDate - (Hsecs-S.Value)/(24*3600*100),'MM/DD/YYYY HH24
:MI:SS')  Last_Non_Idle_Time
  2  from V$SESSTAT S, V$STATNAME N, V$TIMER
  3  where N.Name = 'process last non-idle time'
  4  and N.Statistic# = S.Statistic#
  5  and S.Value != 0;



       SID  LAST_NON_IDLE_TIME
----------  -------------------
         1  03/20/2010 17:59:15

1 row selected.

SQL>
SQL>

   
    
    
    
  








Related examples in the same category

1.Prints the total UGA for your environment
2.Show when the current user connected to the system (not available on all platforms).