Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Tuesday, November 25, 2008

Calculate number of concurrent users of an existing instance

The view v$license keeps track of concurrent sessions and users.

SQL> desc v$license
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------
 SESSIONS_MAX                                       NUMBER
 SESSIONS_WARNING                                   NUMBER
 SESSIONS_CURRENT                                   NUMBER
 SESSIONS_HIGHWATER                                 NUMBER
 USERS_MAX                                          NUMBER
 CPU_COUNT_CURRENT                                  NUMBER
 CPU_CORE_COUNT_CURRENT                             NUMBER
 CPU_SOCKET_COUNT_CURRENT                           NUMBER
 CPU_COUNT_HIGHWATER                                NUMBER
 CPU_CORE_COUNT_HIGHWATER                           NUMBER
 CPU_SOCKET_COUNT_HIGHWATER                         NUMBER

select sessions_current from v$license;

The above query will give you the number of concurrent users right now.

You can write a small job which will capture this information every hour for a week.  Once you have this data, you can take an average of this data to get the number of concurrent users. 

3 comments:

Anonymous said...

Only 10g

select *
from DBA_HIST_RESOURCE_LIMIT
where resource_name = 'sessions'
order by snap_id;

You can know the snap_id timing from dba_hist_snapshot. Normaly each snap is an interval of 1 hour.
You can add a where of between snap_ids and take the max(current_utilization)

Gaurav Dutt said...

Is this query correct to get the no. of concurrent user connect to oracle application at the moment???

Gaurav Dutt said...

Is this query correct to get the no. of concurrent user connect to oracle application at the moment???