-
V$session interpretation
what is the difference between sid and audsid columns in V$SESSION table ?
Regards
Deba
-
sid values are reused - tend to be small numbers - this is the FK that is used in other sys tables.
audsid is not reused in the life of the database - grows monotonically to large vaues - don't think it is used elsewhere.
Last edited by DaPi; 07-10-2003 at 08:49 AM.
-
This document might help to explain it a bit further
http://support.oracle.co.uk/metalink...&p_id=122230.1
HTH
Jim
Oracle Certified Professional
"Build your reputation by helping other people build theirs."
"Sarcasm may be the lowest form of wit but its still funny"
Click HERE to vist my website!
-
Thanks for the link Jim - I never knew AUDSID could be zero like that.
-
sid - session identifier
audsid - auditing session id
audsid is 0 for connect internal. The values of audsid is from a sequence.
HTH.
-
??????
Thats a good one.
-
mon·o·ton·ic Mathematics. Designating sequences, the successive members of which either consistently increase or decrease but do not oscillate in relative value. Each member of a monotone increasing sequence is greater than or equal to the preceding member; each member of a monotone decreasing sequence is less than or equal to the preceding member.
So actually I was a bit off beam since monotonic seems to include equality. But that's not how I remember it . . . . .
-
Thanks for the reply. But It is not clear from the point of view of usability. Which one sould be used and where ?
select * from v$session where audsid = userenv('sessionid');
returns a row
But
select * from v$session where audsid = userenv('sessionid');
does not return any row.
So it implies that sid column has different meaning to Oracle. So in which cases sid column can be used ?
reagrds
Deba
-
userenv('sessionid') returns the AUDSID. v$session can then show which SID that corresponds to. I've just posted this elsewhere, it will show how the two are used:
Code:
select n.name, s.value
from v$statname n, v$sesstat s, v$session a
where n.statistic# = s.statistic#
and value > 0
and s.sid = a.sid
and a.audsid = userenv('sessionid')
order by n.class, n.name
/
-
many many thanks everyone
Reagrds
Deba
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|