Xref: alice comp.databases.oracle.server:22268
Path: alice!news-feed.fnsi.net!hammer.uoregon.edu!sussi.cressoft.com.pk!not-for-mail
From: Umar FArooq <umar.farooq@cressoft.com.pk>
Newsgroups: comp.databases.oracle.server
Subject: Re: Trace Files
Date: Sat, 06 Jun 1998 16:04:38 +0500
Organization: A poorly-installed InterNetNews site
Lines: 38
Message-ID: <35792246.A3BF6178@cressoft.com.pk>
References: <357919DC.2F88C8@vmoy.demon.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.01 [en] (Win95; I)
X-Priority: 3 (Normal)

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@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?



