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: enable sql trace on users

Re: enable sql trace on users

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Thu, 17 Oct 2002 22:50:36 +1000
Message-ID: <Eayr9.54966$g9.159076@newsfeeds.bigpond.com>

"Teresa" <tpreto7_at_sapo.pt> wrote in message news:6dabc692.0210170351.791f7154_at_posting.google.com...
> tpreto7_at_sapo.pt (Teresa) wrote in message
news:<6dabc692.0210161531.5781fc30_at_posting.google.com>...
> > I would liek to set up sql tracing on some users, can someone please
> > tell me how can I do it. I needed in order to view how many times some
> > users are connecting to the database then I need to set up user
> > profiles for that specific users that are taking to many connections.
> > Any ideias would be great
> > Thanks
> > Teresa
>
>
> Thank you Stan
>
> Can you please tell me where do I apply this: I have 3 users in the
> entire schema which I would like to monitor,
> Thanks again
> Teresa
>
>
> if (user='blah') then
> execute immediate 'alter session set sql_trace=true';
> end if;

Hi Teresa.

Stan's recommended creating a logon trigger, something like

create or replace trigger bowie_logon
after logon on database
begin

   if user = major_tom or user = ziggy or user = aladdin_sane then trace the buggers ...

you could also create triggers on particular schemas (rather than on database)

BUT read Sybrand's post as he has quite correctly told you that what you really want to do to meet your requirements is AUDIT the database and not trace.

Cheers

Richard Received on Thu Oct 17 2002 - 07:50:36 CDT

Original text of this message

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