Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: dbms_session.unique_session_id for other sessions?

Re: dbms_session.unique_session_id for other sessions?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 30 Aug 2005 07:57:27 -0700
Message-ID: <1125413847.112288.244140@g14g2000cwa.googlegroups.com>


Volker, where is your application getting the session id from? Are you using dbms_session.unique_session_id or v$session.sid?

There is no dynamic performance view that directly contains a list of the unique_session_id in use for all existing sessions.

View v$session does on the other hand have a list of all current sid's.  However in theory sid's can be duplicated and it is the combination of sid, serial# that provides uniqueness.

I have discovered that the unique session identified provied via dbms_session can actually be converted to the sid and serial# in v$session but the last portion of the number is a sequence and as far as I know does not exist anywhere.

Nevertheless if you are using dbms_session.unique_session_id to create your key then you can probably join to v$session on the sid, serial# and not worry about the sequence portion.

But it might be easier to add a date/time column to the table and remove data that is older than a session can be and run this task daily.

HTH -- Mark D Powell -- Received on Tue Aug 30 2005 - 09:57:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US