The address, hash_value and sql_hash_value columns are used to find the
currently executing SQL for the session.
As the SQL clearly shows, the SID, is stored in v$session. These are pretty
dynamic values for sessions, as they are updated regularly, that is why they
are stored in these dynamic tables.
HTH
Mark
-----Original Message-----
sahani
Sent: Tuesday, February 20, 2001 04:30
To: Multiple recipients of list ORACLE-L
Thankx Mark,
That was info. which I'm looking for.Can U pls.
expalin me what is hash_value,address,sql_hash_value
And where is SYSTEM ID is stored in Oracle????
Regards
Bipin
- DIRCON <mark_at_cool-tools.co.uk> wrote: > Howe about
this little ditty:
>
> select s.sid sid, c.sql_text sql_text, c.address
> address,
> ltrim(to_char(c.hash_value,'9999999999'),' ')
> hash_value
> from v$open_cursor c, v$session s
> where c.saddr = s.saddr and c.hash_value !=
> s.sql_hash_value and s.username
> = 'YOUR_USER_NAME'
>
> This should give you all SQL being executed by your
> user name, unless all
> users log on to an app, that then uses the same
> username to access the
> database. In this case, you could change s.username
> to OSUSER, if known, or
> in fact TERMINAL. You should know these for your own
> PC..
>
> Is this what you are looking for?
>
> Regards
>
> Mark
>
> -----Original Message-----
> sahani
> Sent: Monday, February 19, 2001 02:31
> To: Multiple recipients of list ORACLE-L
>
>
> Thankx for info.
>
> But these SID are unique for each oracle user.They
> can't be distingish if 10 persons using same Oracle
> login and issuing 10 different queries.
>
> I want to know SID for a specific query issued by
> me.
>
> Is there a way to find it out???????
>
> Thankx and regards
> Bipin
> --- "Trassens, Christian" <CTrassens_at_uni2.es> wrote:
> >
> You have some options:
> >
> > select sid from v$mystat
> > where rownum=1;
> >
> > If the user has privilege to access
> sys.v_$session,
> > then you can issue:
> >
> > select sid from v$session
> > where audsid=userenv('SESSIONID');
> >
> > However connected as internal the
> > userenv('SESSIONID') gives you a 0. Hence,
> > you couldn't recognize the sid.
> >
> > Regards.
> >
> > > -----Mensaje original-----
> > > De: bipin sahani [SMTP:bipinsahani_at_yahoo.co.in]
> > > Enviado el: sábado 17 de febrero de 2001 12:56
> > > Para: Multiple recipients of list ORACLE-L
> > > Asunto: Re:Thankx and more questions about SID
> > >
> > > Thankx for info
> > >
> > > Can I write a query which will give me a SESSION
> > ID of
> > > only
> > > my session??????????
> > >
> > >
> > > And where system id is stored?????????????
> > >
> > >
> > > Thankx and regards
> > > Bipin
> > > --- Arun Aggarwal <arun_at_ggn.aithent.com> wrote:
> >
> > The
> > > SID in V$SESSION is session id not the system ID
> > > > given to the Instance.
> > > >
> > > > These are two different things.
> > > >
> > > > Regards
> > > > Arun Aggarwal
> > > > Aithent Technologies (P) Ltd.
> > > > arun_at_ggn.aithent.com
> > > > +91-124-6455504 (101)
> > > >
> > > > "If I knew what I was so anxious about, I
> > wouldn't
> > > > be so anxious."
> > > > --Mignon McLaughlin
> > > >
> > > > ----- Original Message -----
> > > > To: "Multiple recipients of list ORACLE-L"
> > > > <ORACLE-L_at_fatcity.com>
> > > > Sent: Saturday, February 17, 2001 13:55
> > > >
> > > >
> > > > > Hi ALL,
> > > > > I'm confused regarding numeric and multiple
> > SIDs
> > > > > present in V$SESSION for same USER# and
> > USERNAME
> > > > > How is it possible??????????
> > > > > As far as I know there should be one SID for
> > every
> > > > > instance of oracle.
> > > > > Then how v$session shows me more than one
> SID
> > > > > for same user.And if all these numeric SIDs
> > > > > correspond to one alphanumeric SID
> > > > > which is SID of that instance then where is
> > the
> > > > > mapping between numeric and alpha numeric
> SID?
> > > > >
> > > > >
> > > > > Thankx and regards
> > > > > Bipin
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > Do You Yahoo!?
> > > > > Get your free @yahoo.co.in address at
> > > > http://mail.yahoo.co.in
> > > > > --
> > > > > Please see the official ORACLE-L FAQ:
> > > > http://www.orafaq.com
> > > > > --
> > > > > Author: =?iso-8859-1?q?bipin=20sahani?=
> > > > > INET: bipinsahani_at_yahoo.co.in
> > > > >
> > > > > Fat City Network Services -- (858)
> 538-5051
> >
> > > > FAX: (858) 538-5051
> > > > > San Diego, California -- Public
> > Internet
> > > > access / Mailing Lists
> > > > >
> > > >
> > >
> >
>
> > > > > To REMOVE yourself from this mailing list,
> > send an
> > > > E-Mail message
> > > > > to: ListGuru_at_fatcity.com (note EXACT
> spelling
> > of
> > > > 'ListGuru') and in
> > > > > the message BODY, include a line containing:
> > UNSUB
> > > > ORACLE-L
> > > > > (or the name of mailing list you want to be
> > > > removed from). You may
> > > > > also send the HELP command for other
> > information
> > > > (like subscribing).
> > > >
> > > > --
> > > > Please see the official ORACLE-L FAQ:
> > > > http://www.orafaq.com
> > > > --
> > > > Author: Arun Aggarwal
> > > > INET: arun_at_ggn.aithent.com
> > > >
> > > > Fat City Network Services -- (858) 538-5051
> > FAX:
> > > > (858) 538-5051
> > > > San Diego, California -- Public
> Internet
> > > > access / Mailing Lists
> > > >
> > >
> >
>
> > > > To REMOVE yourself from this mailing list,
> send
> > an
> > > > E-Mail message
> > > > to: ListGuru_at_fatcity.com (note EXACT spelling
> of
> > > > 'ListGuru') and in
> > > > the message BODY, include a line containing:
> > UNSUB
>
=== message truncated ===
Do You Yahoo!?
Get your free @yahoo.co.in address at
http://mail.yahoo.co.in
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: =?iso-8859-1?q?bipin=20sahani?=
INET: bipinsahani_at_yahoo.co.in
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Mark Leith
INET: mark_at_cool-tools.co.uk
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Tue Feb 20 2001 - 04:46:03 CST