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: Destination for the SQL trace file?

Re: Destination for the SQL trace file?

From: Steve Patterson <spatt01_at_earthlink.net>
Date: Thu, 7 Oct 1999 09:00:01 -0000
Message-ID: <7ti8up$s15$1@fir.prod.itd.earthlink.net>


You can also just look at the init<SID>.ora file if you can get to it.

It is usualy in <ORACLE_HOME>\database

Edorta Simon wrote in message <37F37F06.2C3B6570_at_tid.es>...
>Sorry, I didn't read the "(not having the DBA privilege)"
>
>Edorta Simon wrote:
>
>> By running this script you'll enable trace and you'll have the full name
>> of the file in the variable "trace_file_name". Beware of the ordinal
>> part of the name (l_pid variable), which is in hexadecimal format.
>>
>> Erika Grondzakova wrote:
>>
>> > Hello,
>> >
>> > How could I find out (not having the DBA privilege) where is the
>> > destination for the trace file generated be the SQL trace facility?
>> >
>> > Thanks in advance,
>> >
>> > Erika Grondzakova
>>
>> -----------------------------------------------------------------------
-
>> declare
>> cursor udd_csr is
>> select value
>> from v$parameter
>> where name = 'user_dump_dest';
>> cursor my_pid_csr is
>> select spid
>> from v$process
>> where addr = (select paddr
>> from v$session
>> where audsid=userenv('sessionid'));
>> l_user_dump_dest varchar2(256);
>> l_pid varchar2(20);
>> begin
>> -- set trace on
>> dbms_session.set_sql_trace(true);
>> -- get user_dump_dest
>> open udd_csr;
>> fetch udd_csr into l_user_dump_dest;
>> close udd_csr;
>> -- get process id for the shadow
>> open my_pid_csr;
>> fetch my_pid_csr into l_pid;
>> close my_pid_csr;
>> -- return the name of the trace file
>> dbms_output.put_line(l_user_dump_dest||'\ora'||l_pid||'.trc');
>> :trace_file_name := l_user_dump_dest||'\ora'||l_pid||'.trc';
>> end;
>> /
>
Received on Thu Oct 07 1999 - 04:00:01 CDT

Original text of this message

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