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: How to distinguish b/w normal trace file and different Sessions enabled SQL trace files?

Re: How to distinguish b/w normal trace file and different Sessions enabled SQL trace files?

From: <fitzjarrell_at_cox.net>
Date: 28 Jul 2006 09:15:58 -0700
Message-ID: <1154103358.396752.231180@75g2000cwc.googlegroups.com>

Gints Plivna wrote:
> Sybrand Bakker wrote:
> > On 27 Jul 2006 23:10:04 -0700, "Ghalib" <ghalib314_at_yahoo.com> wrote:
> >
> > > Suppose more than two users generate their tracefiles through SQL
> > >Trace
> > >utility on The Operating system (windows) at the same time, than How
> > >would we tag their trace files through a method as you said. How would
> > >we find their trace files among others?
> > >
> > >Asad
> >
> > You stick to top-posting.
> >
> > Top-posting means NO RESPONSE
> >
> > --
> > Sybrand Bakker, Senior Oracle DBA
>
> Top posting means GOD's punishment! :))))
>
> But seriously I cannot find a reason why you can't just issue
> alter session set tracefile_identifier = 'bla1' for first user and
> alter session set tracefile_identifier = 'bla2' for second user??
>
> Gints Plivna
> http://www.gplivna.eu

Create this trigger as SYS:

create or replace trigger set_trcfile_ident after logon on database
declare

        sqltext varchar2(4000);
begin

	sqltext:='alter session set tracefile_identifier='''||user||'''';
	execute immediate sqltext;

end;
/

Which should solve your problems, unless you have a common user account for all. Then you could use this:

create or replace trigger set_trcfile_ident after logon on database
declare

        sqltext varchar2(4000);
begin

        sqltext:='alter session set
tracefile_identifier='''||sys_context('USERENV','OS_USER')||'''';

        execute immediate sqltext;
end;
/

There shouldn't be a common OS user ...

David Fitzjarrell Received on Fri Jul 28 2006 - 11:15:58 CDT

Original text of this message

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