Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2010-09-24
4
Medium Priority
?
1,024 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 74

Expert Comment

by:sdstuber
ID: 33754545
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 74

Accepted Solution

by:
sdstuber earned 2000 total points
ID: 33754569
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
ID: 33754741
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 74

Expert Comment

by:sdstuber
ID: 33754822
v$session, definitely.

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

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

604 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