set pages 250
set lines 400
col object_name format a32

select ash.user_id,
users.username,
snap.BEGIN_INTERVAL_TIME,
sql_id,
CURRENT_OBJ#,
o.object_name,
IN_CONNECTION_MGMT,
IN_PARSE,
IN_PARSE,
IN_SQL_EXECUTION,
IN_PLSQL_RPC,
IN_PLSQL_COMPILATION,
IN_BIND,
IN_CURSOR_CLOSE,
IN_SEQUENCE_LOAD,
MACHINE,
PORT,
TM_DELTA_CPU_TIME,
TM_DELTA_DB_TIME,
DELTA_READ_IO_REQUESTS,
DELTA_WRITE_IO_REQUESTS,
DELTA_READ_IO_BYTES,
DELTA_WRITE_IO_BYTES,
PGA_ALLOCATED,
TEMP_SPACE_ALLOCATED
from dba_hist_snapshot snap,
DBA_HIST_ACTIVE_SESS_HISTORY ash,
dba_users users,
dba_objects o
where snap.SNAP_ID=ash.SNAP_ID
and snap.DBID = ash.DBID
and snap.instance_number=ash.instance_number
and ash.user_id=users.user_id
and ash.current_obj#=o.object_id(+)
and snap.BEGIN_INTERVAL_TIME between to_date(‘’) and to_date(‘’)
order by sql_id,users.username,snap.BEGIN_INTERVAL_TIME

/