NUmber of logged on users

From: Ross Cuthbertson <ross_cuthbertson_at_unn.unisys.com>
Date: Thu, 13 Aug 1998 09:34:25 +1000
Message-ID: <6qt92i$err$1_at_mail.pl.unisys.com>



We have a query that we run every 15 minutes drop table xxx_user_count;
create table xxx_user_count
   (active_users        number(4),
    inactive_users      number(4)

   );
insert into xxx_user_count (active_users,inactive_users)

   vaules(0,0);
update xxx_user_count

   set active_users =

(select count(*) from v$session

       where   osuser != 'ORACLE' and
          osuser != 'APPLMGR' and
               status  = 'ACTIVE'
      );

update xxx_user_count

   set inactive_users =

(select count(*) from v$session

       where   osuser != 'ORACLE' and
          osuser != 'APPLMGR' and
               status  = 'INACTIVE'
      );

set pages 0
spool $DIR/user_count_${ORACLE_SID}.rpt
select to_char(sysdate,'DD:MM:YY') || ' ' || to_char(sysdate,'HH:MI') ||

   ' users : active = ' || active_users ||    ' inactive = ' || inactive_users
   from xxx_user_count;
spool off
host type $DIR/user_count_${ORACLE_SID}.rpt >> $DIR/user_count_${ORACLE_SID}.tot
exit.

But we are not sure if this is the true indication as when we look at v$session we notice that one machine(IP address) could be logged on multiple times.

Does this mean they have multiple sessions or is FINS spawning extra sessions when they run a report?
I guess what I am asking is does anyone have a query that they know(has been tested) is the correct count?

any suggstions
Thanks
Ross Cuthbertson Received on Thu Aug 13 1998 - 01:34:25 CEST

Original text of this message