Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: v$sql how to distinguish between internal dictionary selects and user selects
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.orgReceived on Sun Oct 15 2006 - 18:31:22 CDT