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: v$sql how to distinguish between internal dictionary selects and user selects

Re: v$sql how to distinguish between internal dictionary selects and user selects

From: DA Morgan <damorgan_at_psoug.org>
Date: Sun, 15 Oct 2006 16:31:22 -0700
Message-ID: <1160955078.393275@bubbleator.drizzle.com>


dbaplusplus_at_hotmail.com wrote:
> I am on HP UNIX 11i using Oracle 9.2.0.5
>
> I am trying to wtite a program which will show me all the
> user/application selects. I do not want to print internal Oracle select
> satataemnts such as
> select text from view$ where rowid=:1
>
> I only want to print select statements exeuted by users or my
> application but not by Oracle.
>
> Is there a way to do it. Oracle documentation on columns of v$sql is
> cryptic.

I'm not sure when it was implemented but in 10gR2 one can link to gv$session and use the PROGRAM and SERVICE_NAME columns to distinguish. Just link it back into your query.

In 10gR2 gv$sql contains a SERVICE column too.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sun Oct 15 2006 - 18:31:22 CDT

Original text of this message

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