3.8 Create and Manage Database Users -------------------------------- - Controlling user access. - Monitoring user sessions - V$SESSION view - Monitoring idle time >>>> Begin of script rem**************************************************** rem**************************************************** rem IDLE_TIME MONITOR SCRIPT rem**************************************************** rem**************************************************** rem rem rem This script provides an easy way for dba to rem monitor session idle times. The output of rem the script shows the sid for each session rem running against the database, the last time rem this session was active (including date and rem time), the current time and the amount of rem time (in seconds as well as minutes) elapsed rem since the session became inactive. This rem script is written to be run from the sys rem account in sqlplus. rem column sid format 999 column last format a22 heading "Last non-idle time" column curr format a22 heading "Current time" column secs format 99999999.999 - heading "idle-time |(seconds)" column mins format 999999.99999 heading "idle-time |(minutes)" select sid, to_char((sysdate - (hsecs - value)/(100*60*60*24)), 'dd-mon-yy hh:mi:ss') last, to_char(sysdate, 'dd-mon-yy hh:mi:ss') curr, (hsecs - value)/(100) secs, (hsecs - value)/(100*60) mins from V$TIMER, V$SESSTAT where statistic# = (select statistic# from V$STATNAME where Name = 'process last non-idle time'); >>>> End of script - Managing database security for users. - Creating users. Altering users. Dropping an existing user. Monitoring users. Killing user's session. - Controlling database system resources. Managing profiles. View profile information.