Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Session identifier

Posted on 1997-11-06
1
Medium Priority
?
815 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 320 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
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.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

963 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