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: Trace Files

Re: Trace Files

From: Umar FArooq <umar.farooq_at_cressoft.com.pk>
Date: Sat, 06 Jun 1998 16:04:38 +0500
Message-ID: <35792246.A3BF6178@cressoft.com.pk>


Teh following query returns the current session_id

select spid
from v$process
where addr=(select paddr
  from v$session
  where audsid=userenv('sessionid'));

I hope it solves ur problem.

Umar.
Software Engineer
CresSoft, Lahore, Pakistan
umar.farooq_at_cressoft.com.pk

Vincent Moynihan wrote:

> Hi,
>
> How can a session, with trace on, determine the file name of the
> Oracle
> trace file? The server runs on HP Unix 10-10.
>
> We have tried using a stored procedure in a DBA account which returns
>
> select 'ora_'||to_char(p.spid)||'.trc' "Trace File" from v$process
> p,v$session s
> where p.addr=s.paddr
> and s.username = pi_in_username;
>
> However, this query returns all trace files for all the sessions that
> a
> user has open.
>
> Any ideas?
Received on Sat Jun 06 1998 - 06:04:38 CDT

Original text of this message

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