Solved

Difference between v$session and v$license. Need to know the current users of the database.

Posted on 2010-09-24
4
988 Views
Last Modified: 2013-12-19
I need to know the count of the current users connected to the 8i database. I came across two views:

v$session
v$license

v$license output
select SESSIONS_CURRENT from v$license;

SESSIONS_CURRENT
----------------
            1033


v$session output:

select count(sid) from v$session;

COUNT(SID)
----------
      1040


Which one do you think is the right view to look at? And can you also explain their differences.?

Thank You.
0
Comment
Question by:Waqasulhaq
  • 3
4 Comments
 
LVL 73

Expert Comment

by:sdstuber
Comment Utility
you have zoned oracle 8 but your tag is oracle 10.  do you need version specifc info?

in this case the views have expanded between versions but their purpose is the same
0
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
Comment Utility
basically v$license is summary information about usage which can be, as the name implies, used for licensing concerns

v$session gives information about individual connections, their current status, processes, users, terminal, etc.

verion 8 docs on the views
http://download.oracle.com/docs/cd/A87860_01/doc/index.htm
http://download.oracle.com/docs/cd/A87860_01/doc/index.htm

version 10 docs
http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_1144.htm#i1407504
http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2088.htm#i1414383
0
 

Author Comment

by:Waqasulhaq
Comment Utility
So which one do you think is more appropriate to use for finding out the active current users (basically testing the production Load) because as you can see there is difference of count between these two views?

Thank You
0
 
LVL 73

Expert Comment

by:sdstuber
Comment Utility
v$session, definitely.

v$license is a summary of sessions that "have" occurred, not necessarily sessions that "are" occurring now.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now