Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Uknown query
calberto2312_at_gmail.com wrote:
> Hi all,
>
> In my statspack reports, I´ve been seeing some similar queries that
> are unknown for me. They are being executed hundreds of times, but I
> want to find out who is running them. Here´s one of the queries :
>
> select a.default_cpu_cost, a.default_io_cost
> from association$ a
> where a.obj# = :1
> and a.property = :2
>
> Can you help me?
>
> Thanks in advanced,
> Carlos
In addition to Jonathan's comments ... here a demo of how you might track down the answer to the "who ran it" question.
Open two SQL*Plus sessions and in session 1:
SQL> uwclass/uwclass
SQL> SELECT /* This is a test */ COUNT(*) FROM airplanes;
and in session 2:
SQL> SELECT parsing_user_id, parsing_schema_id
2 FROM gv$sql
3 WHERE sql_text LIKE '%This is a test%';
HTH
-- 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 Sat Dec 30 2006 - 14:25:59 CST