Re: How to identify SQLText of a Process/Session?

From: Vikram Goel <vgoel_at_pts.mot.com>
Date: 1996/04/03
Message-ID: <4ju2ko$jsf_at_lserv1.paging.mot.com>#1/1


Badri,

You have the right idea. The column "sql_address" has the value of the "address" field in v$sqlarea, thus joining these two views, will give you the text. NOTE: the column size of the sql_text in v$sqlarea is only 1000 bytes. Let

      me know, if you need to get the complete text (in case longer than 1000 bytes).

Hope this helps,

--
Vikram Goel                                 Motorola email: vgoel_at_pts.mot.com
Oracle DBA - Consultant
Aerotek Inc.                                My email:  vgoel_at_emi.net

Motorola Info:
Mail Stop 39, Room S1014
1500 Gateway Blvd,
Boynton Beach, FL 33426 


In article <4jstgr$pjo_at_gaia.cc.gatech.edu>, badri_at_cc.gatech.edu (badri) writes:

>Hi:
>
> Given all the information in V$SESSION and V$PROCESS, can I
>get the SQL text of that particular process? These views only give me
>the command type (as in select or insert, but I want the entire statement).
>
> In other words, I want to be able to see the SQLText of a
>given ORACLE_PID or SPID or SID/SEQ# combination.
>
>Can this be done?
>
>thanks a lot,
>
>-Badri
>
>p.s: How else can I use V$SQLarea to tie back to processes?
Received on Wed Apr 03 1996 - 00:00:00 CEST

Original text of this message