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: Who executed top queries

Re: Who executed top queries

From: Charles Schultz <sacrophyte_at_gmail.com>
Date: Wed, 29 Nov 2006 14:30:09 -0600
Message-ID: <7b8774110611291230w677f67d3kb086abf55ebc0788@mail.gmail.com>


If using 10g EM, Top Activity makes this really obvious. So I have to assume you are either 1) not using 10g and/or 2) not using EM. If you are using 10g, I believe you can tie the dba_hist_sqltext to DBA_HIST_SQLSTAT to get the parsing_schema. I am not sure how EM builds a historical list of user ids for a particular sql_id.

If using 9i, you are kinda stuck, especially if the sql has aged out of the library cache. But once again, I think you can only get the id of the original parser, not each sql_id that requested that sql_id.

On 11/29/06, George Leonard <george_at_mighty.co.za> wrote:
>
> Hi all
>
>
>
> Customer asked me this, as far as I am aware not possible but thought I
> would just double check.
>
>
>
> I gave them the standard report show top queries by number of times
> executed, rows accessed, buffer blocks accessed etc.
>
>
>
> They now turn around and asked if I can tell them who executed those
> queries.
>
>
>
> I know a lot of changes and additions has been done to the dictionary but
> as far as I know this information is not there.
>
>
>
> Comment, did I miss something or am I still correct in my assumption.
>
>
>
> Other than enabling auditing and recording who is executing what and then
> matching this up with the top queries I don't know of any way to get this.
>
>
>
> Hmm, is it possible to tell the system via say a log in trigger to store
> every query a user execute into a table?
>
>
>
> Suggestions.
>
>
>
> George Leonard
>
> ________________________________________________________________________
>
>
>
> Email: george_at_mighty.co.za
>
>
>
> Coding is easy. All you do is sit staring at a terminal until the drops of
> blood form on your forehead.
>
>
>

-- 
Charles Schultz

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Nov 29 2006 - 14:30:09 CST

Original text of this message

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