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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to identify my session?

Re: How to identify my session?

From: Andrew Babb <andrewb_at_mail.com>
Date: Wed, 05 May 1999 15:50:42 +0800
Message-ID: <372FF851.E6A72A07@mail.com>


Hi,

You could create a database sequence that is incremented by 1 everytime you need to create a table. You could also use the session's id as you were suggesting. The one problem is that the first character of the table should be Alpha, and not numeric, which would be the case if you took either an Oracle Sequence or userenv('sessionid'), so you should be suffixing the tablename with the unique number.

Another option, if you have Oracle8i is to create a global temporary table, which from what I can figure, is a C structure in memory. With this, you can define a table structure, and when you insert data into this table, only you can see the contents of the table. You can define the data to be available for a Session or a Transaction.

Rgds
Andrew

Brahms Lin wrote:

> Hi,
>
> I would like to find some way to identify my Oracle app's session.
> I know there's a v$session, but don't know which is my current
> session. I'm trying to generate an unique table name. I think that
> can be done by prefixing the current session's id to the table name.
>
> Thanks.
>
> (Oracle 8.0.4 on NT workstation 4.0)
Received on Wed May 05 1999 - 02:50:42 CDT

Original text of this message

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