Code Listing 1: Checking the past activities of all sessions of a user ARUP 

 

col event format a30
col sample_time format a25
select session_id, sample_time, session_state, event, wait_time, time_waited, sql_id, sql_child_number CH#
from v$active_session_history
where user_id = 92
and sample_time between
    to_date('29-SEP-12 04.55.00 PM','dd-MON-yy hh:mi:ss PM')
       and
    to_date('29-SEP-12 05.05.00 PM','dd-MON-yy hh:mi:ss PM')
order by session_id, sample_time;

                                     SESSION
SESSION_ID SAMPLE_TIME               _STATE   EVENT                          WAIT_TIME  TIME_WAITED SQL_ID        CH#
—————————— ————————————————————————— ——————— —————————————————————————————— ——————————— ——————————— ————————————— ————
        39 29-SEP-12 04.55.02.379 PM WAITING  enq: TX - row lock contention           0           0 fx60htyzmz6wv   0
        39 29-SEP-12 04.55.03.379 PM WAITING  enq: TX - row lock contention           0           0 fx60htyzmz6wv   0
        39 29-SEP-12 04.55.04.379 PM WAITING  enq: TX - row lock contention           0           0 fx60htyzmz6wv   0
        39 29-SEP-12 04.55.05.379 PM WAITING  enq: TX - row lock contention           0           0 fx60htyzmz6wv   0
        39 29-SEP-12 04.55.06.379 PM WAITING  enq: TX - row lock contention           0           0 fx60htyzmz6wv   0
        39 29-SEP-12 04.55.07.389 PM WAITING  enq: TX - row lock contention           0           0 fx60htyzmz6wv   0
… output truncated …
        39 29-SEP-12 05.16.52.078 PM WAITING  enq: TX - row lock contention           0  1310761160      
        44 29-SEP-12 04.55.34.419 PM WAITING  resmgr:cpu quantum                      0      109984 92ty3097fqfwg   0
        44 29-SEP-12 04.55.35.419 PM ON CPU                                      110005           0 a5wts2yzmws18   0
        44 29-SEP-12 04.55.36.419 PM WAITING  resmgr:cpu quantum                      0      110016 61q5r7d0ztn6n   0
        44 29-SEP-12 04.55.37.419 PM ON CPU                                      109984           0 7bnf79qwyy9k8   0
        44 29-SEP-12 04.55.38.419 PM WAITING  resmgr:cpu quantum                      0      107874 7b0jbugzatdcr   0
        44 29-SEP-12 04.55.39.419 PM WAITING  resmgr:cpu quantum                      0      107962 fngb4y81xr57x   0
… output truncated …
        46 29-SEP-12 04.57.18.555 PM ON CPU                                      110984           0 f7kmq72a8h7pt   0
        46 29-SEP-12 04.57.19.555 PM WAITING  resmgr:cpu quantum                      0      110981 f7kmq72a8h7pt   0
        46 29-SEP-12 04.57.20.555 PM ON CPU                                      110982           0 f7kmq72a8h7pt   0
        46 29-SEP-12 04.57.21.555 PM WAITING  resmgr:cpu quantum                      0      111974 f7kmq72a8h7pt   0
        46 29-SEP-12 04.57.22.555 PM ON CPU                                      112986           0 f7kmq72a8h7pt   0
        46 29-SEP-12 04.57.23.555 PM WAITING  resmgr:cpu quantum                      0      111998 f7kmq72a8h7pt   0
        46 29-SEP-12 04.57.24.555 PM WAITING  resmgr:cpu quantum                      0      108975 f7kmq72a8h7pt   0
… output truncated …