Following query might help:

select piece, sql_text
from v$sqltext
where (address,hash_value) in
      (select sql_address,sql_hash_value
       from v$session
       where paddr = (select addr
                      from v$process
                      where spid = '&1'))
order by piece
/
set linesize 120
select substr(vs.username,1,10)username,
       vs.osuser,
       vs.sid,
       vs.serial#,
       vs.LOGON_TIME,
       substr(vs.machine,1,15)machine,
       vs.process,
       vp.spid,
       vs.last_call_et
from v$session vs, v$process vp
where vs.paddr = vp.addr
and vs.username is not null
and vs.status = 'ACTIVE'
/

HTH,
Regards
Rafiq


To get SPID:




Reply-To: [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Date: Wed, 12 Jun 2002 13:59:52 -0800

PIECE column?  By joining V$SQLAREA to V$SQLTEXT?  (on ADDRESS)

So, then, having the text truncated to 1000 chars in V$SQLAREA is no big
deal, but it could be confusing if you had multiple rows in V$SQLAREA with
the first 1000 chars of the SQL statement exactly the same, correct?  The
theory being that you could join to V$SQLTEXT by ADDRESS to get the entire
text if needed.

Rich Jesse                           System/Database Administrator
[EMAIL PROTECTED]              Quad/Tech International, Sussex, WI USA


 > -----Original Message-----
 > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 > Sent: Wednesday, June 12, 2002 2:51 PM
 > To: [EMAIL PROTECTED]
 > Cc: Jesse, Rich
 > Subject: Re: V$SQLTEXT text length
 >
 >
 > Please notice the PIECE column.
 >
 > Jared
 >
 > "Jesse, Rich" <[EMAIL PROTECTED]>
 > Sent by: [EMAIL PROTECTED]
 > 06/12/2002 01:04 PM
 > Please respond to ORACLE-L
 >
 >
 >         To:     Multiple recipients of list ORACLE-L
 > <[EMAIL PROTECTED]>
 >         cc:
 >         Subject:        V$SQLTEXT text length
 >
 >
 > While researching some shared_pool problems <groan> on an
 > 8.1.6 instance,
 > I
 > happen to notice that the SQL_TEXT column of the V$SQLAREA
 > view is "only"
 > 1000 bytes.  What happens when the statement is longer than
 > that?  Does it
 > just not show all of it in that view?
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Jesse, Rich
   INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mohammad Rafiq
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to