Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1029
  • Last Modified:

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

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
Waqasulhaq
Asked:
Waqasulhaq
  • 3
1 Solution
 
sdstuberCommented:
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
 
sdstuberCommented:
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
 
WaqasulhaqAuthor Commented:
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
 
sdstuberCommented:
v$session, definitely.

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

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now