Solved

Session identifier

Posted on 1997-11-06
1
800 Views
Last Modified: 2012-05-04
Which is the number that identifies uniquely an Oracle Session?
How can an user know it?

I know the session id SID and SERIAL# on table V$SESSION.
This two attributes are necessary to KILL a session.
How can an user know his sesion id SID and SERIAL#?

Besides, Auditing session id exists in the same table too (AUDSID column).
An user can know his AUDSID with: SELECT USERENV('SESSIONID') FROM DUAL

What's the different between AUDSID and (SID,SERIAL#)?

Thanks!
0
Comment
Question by:ppgg
1 Comment
 
LVL 3

Accepted Solution

by:
poncejua earned 80 total points
ID: 1080745
Hi ppgg,

First of all let me tell you that you have a funny user name.

The SID identifies the session; the SERIAL# identifies the session serial number and it is used to identify uniquely a session's objects; also guarantees that session-level commands are applied to the correct session objects if the session ends and another session begins with the same session ID.

On the other hand, AUDSID represents the auditing session ID.

If you want to obtain some information about the session you can do a join between the V$SESSION and DUAL tables. Let me give you an example:

Suppose that I want to know the username for my current session (username means the client name not the oracle username):

SELECT OSUSER FROM V$SESSION WHERE AUDSID = ( SELECT USERENV('SESSIONID') FROM DUAL);

I hope this helps you. If not please do not hesitate to contact me directly to my e-mail address: jmponcemartinez@hotmail.com

Regards,

Juan Manuel Ponce Martinez
DBA - Bridas S.A.P.I.C.
Buenos Aires - Argentina
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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

706 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

19 Experts available now in Live!

Get 1:1 Help Now