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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: V$SQLTEXT text length

RE: V$SQLTEXT text length

From: Mohammad Rafiq <rafiq9857_at_hotmail.com>
Date: Wed, 12 Jun 2002 14:30:18 -0800
Message-ID: <F001.0047C7D7.20020612143018@fatcity.com>


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: ORACLE-L_at_fatcity.com
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> 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
Rich.Jesse_at_qtiworld.com              Quad/Tech International, Sussex, WI USA


> -----Original Message-----
> From: Jared.Still_at_radisys.com [mailto:Jared.Still_at_radisys.com]
> Sent: Wednesday, June 12, 2002 2:51 PM
> To: ORACLE-L_at_fatcity.com
> Cc: Jesse, Rich
> Subject: Re: V$SQLTEXT text length
>
>
> Please notice the PIECE column.
>
> Jared
>
> "Jesse, Rich" <Rich.Jesse_at_qtiworld.com>
> Sent by: root_at_fatcity.com
> 06/12/2002 01:04 PM
> Please respond to ORACLE-L
>
>
> To: Multiple recipients of list ORACLE-L
> <ORACLE-L_at_fatcity.com>
> 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: Rich.Jesse_at_qtiworld.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 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: rafiq9857_at_hotmail.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 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 Wed Jun 12 2002 - 17:30:18 CDT

Original text of this message

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