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 get my session id?

Re: How to get my session id?

From: Gunjeet Singh <gunjeet_at_sunsparkle.ebay.sun.com>
Date: 7 Aug 1998 18:10:48 GMT
Message-ID: <6qffv8$bp2$1@ebaynews1.Ebay.Sun.COM>


You can also try this in sqlplus :

select s.sid from v$session s where s.terminal = userenv('terminal');

or if you want both sid & serail# :

select s.sid sess_id,s.serial# from v$process p, v$session s where p.addr = s.paddr and s.terminal = userenv('terminal');

In article 1_at_nnrp1.dejanews.com, jcarlosp_at_my-dejanews.com writes:
> Hello,
>
> I supouse that you have not been granted on v$session. If I am right, is
> quite dificult to get the sid number.
>
> If you have grants on the system views, only qwery this:
>
> select username,sid from v$session where username=<your user name>;
>
> Nice to help you, Juan Carlos
>
>
> In article <35C75C76.C89FF397_at_hk.super.net>,
> kelvinng_at_POBoxes.com wrote:
> > Hello,
> >
> > I would like to know that how can I obtain my session id by using
> > SQL or by any pseudo-column.
> >
> > Thank you for your ssuggestion and attention.
> >
> > Kelvin Ng
> >
Received on Fri Aug 07 1998 - 13:10:48 CDT

Original text of this message

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