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 find the trace file name?

Re: How to find the trace file name?

From: <rspeaker_at_my-dejanews.com>
Date: Thu, 07 Jan 1999 18:55:02 GMT
Message-ID: <772vu4$9c9$1@nnrp1.dejanews.com>


If you are running on UNIX platform, and aren't running multiple traces at the same time, you could do something like this in your script:

trace_file=`ls -alt /<USER_DUMP_DEST>/*.trc | head -1`

to get the trace file name, then pass that on to your tkprof command.

HTH,
Roy

In article <0685A427A719D11197BB00A024D399450BBB4C26_at_delphi.sapient.com>,   John Harris <jharri_at_sapient.com> wrote:
> Hi
>
> The xxxx part of the trace file is the OS process id of the process
> which generated the file. It can be found by joining the V$SESSION and
> V$PROCESS tables
>
> select proc.spid os_process_id
> from v_$session sess,
> v_$process proc
> where proc.addr = sess.paddr
> and sess.audsid = userenv('SESSIONID');
>
> -----Original Message-----
> From: Frank Hubeny [mailto:fhubeny_at_ntsource.com]
> Posted At: Tuesday, January 05, 1999 8:11 PM
> Posted To: server
> Conversation: How to find the trace file name?
> Subject: How to find the trace file name?
>
> Is there a way to find the name of the trace file that is written after
> one runs
>
> alter session set sql_trace = true;
>
> I am aware that one answer is to look at the files in USER_DUMP_DEST and
> find the one that has the appropriate date stamp, but I would like to
> automate the process of running tkprof after running a script containing
> the alter session command.
>
> The only thing that stops this automation is knowing the name of the
> oraxxxxx.trc file that is being generated.
>
> Frank Hubeny
> Wheaton, IL
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Jan 07 1999 - 12:55:02 CST

Original text of this message

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