REM
REM DBAToolZ NOTE:
REM This script was obtained from DBAToolZ.com
REM It's configured to work with SQL Directory (SQLDIR).
REM SQLDIR is a utility that allows easy organization and
REM execution of SQL*Plus scripts using user-friendly menu.
REM Visit DBAToolZ.com for more details and free SQL scripts.
REM
REM
REM File:
REM s_user_events.sql
REM
REM TRACE USER
REM
REM Author:
REM Vitaliy Mogilevskiy
REM VMOGILEV
REM (vit100gain@earthlink.net)
REM
REM Purpose:
REM
REM Reports minutes in wait per event for a SID
REM
REM
REM Usage:
REM s_user_events.sql
REM
REM Example:
REM s_user_events.sql
REM
REM
REM History:
REM 08-01-1998 VMOGILEV Created
REM
REM
select sid
, event
, total_waits
, total_timeouts
, TO_CHAR(time_waited/100/60,'99,999,999.99') min_in_wait
from v$session_event
where sid=&sid
;