Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Name of Oracle Trace
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
This script gets the name of the trace file for the current session. It can be used interactively, or from other scripts. The name is saved in the SQL*Plus define &Trace_Name.
There are three versions of the query below, because the trace files are named differently depending on the platform. The two incorrect version should be commented out or deleted.
column trace_file_name new_value Trace_Name column trace_file_zipped new_value Trace_Zipped noprint
select
d.value || '/ora_' || p.spid || '.trc' trace_file_name,
d.value || '/ora_' || p.spid || '.trc.gz' trace_file_zipped
from
( select
p.spid
from
sys.v_$mystat m, sys.v_$session s, sys.v_$process p where m.statistic# =3D 1 and s.sid =3D m.sid and p.addr =3D s.paddr
value
from
sys.v_$parameter
where
name =3D 'user_dump_dest'
) d
/
select
d.value||'/'||lower(i.instance)||'_ora_'||p.spid||'.trc'
trace_file_name,
d.value||'/'||lower(i.instance)||'_ora_'||p.spid||'.trc.gz'
trace_file_zipped
from
( select
p.spid
from
sys.v_$mystat m, sys.v_$session s, sys.v_$process p where m.statistic# =3D 1 and s.sid =3D m.sid and p.addr =3D s.paddr
instance
from
sys.v_$thread
) i,
( select
value
from
sys.v_$parameter
where
name =3D 'user_dump_dest'
) d
/
select
d.value || '\ora' || lpad(p.spid, 5, '0') || '.trc' trace_file_name,
d.value || '\ora' || lpad(p.spid, 5, '0') || '_trc.gz'
trace_file_zipped
from
( select
p.spid
from
sys.v_$mystat m, sys.v_$session s, sys.v_$process p where m.statistic# =3D 1 and s.sid =3D m.sid and p.addr =3D s.paddr
value
from
sys.v_$parameter
where
name =3D 'user_dump_dest'
) d
/
clear columns
-----Message d'origine-----
De : Place for oracle [mailto:place4oracle_at_yahoo.com]
Envoy=E9 : mar. 16 mai 2000 11:04
=C0 : Multiple recipients of list ORACLE-L
Objet : Name of Oracle Trace
Hello,
Does someone know how to found the Oracle trace name. We have ORA00512.trc but how can I know that it is my trace.
regards
P.T and H.E
=3D=3D=3D=3D=3D
Place4oracle=20
http://altern.org/place4oracle/place4oracle.html
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =5.0.1459.75">
<TITLE>RE: Name of Oracle Trace</TITLE> </HEAD> <BODY>
<P><FONT SIZE=3D2>This script gets the name of the trace file for the =
current</FONT>
<BR><FONT SIZE=3D2>session. It can be used interactively, or from =
other scripts.</FONT>
<BR><FONT SIZE=3D2>The name is saved in the SQL*Plus define =
&Trace_Name.</FONT>
</P>
<P><FONT SIZE=3D2>There are three versions of the query below, because =
the trace</FONT>
<BR><FONT SIZE=3D2>files are named differently depending on the =
platform. The</FONT>
<BR><FONT SIZE=3D2>two incorrect version should be commented out or =
deleted.</FONT>
</P>
<P><FONT SIZE=3D2>column trace_file_name new_value Trace_Name</FONT>
<BR><FONT SIZE=3D2>column trace_file_zipped new_value Trace_Zipped =
noprint</FONT>
</P>
<P><FONT SIZE=3D2>select</FONT>
<BR><FONT SIZE=3D2> d.value || '/ora_' || p.spid || '.trc' =
trace_file_name,</FONT>
<BR><FONT SIZE=3D2> d.value || '/ora_' || p.spid || '.trc.gz' =
trace_file_zipped</FONT>
<BR><FONT SIZE=3D2>from</FONT> <BR><FONT SIZE=3D2> ( select</FONT> <BR><FONT SIZE=3D2> p.spid</FONT> <BR><FONT SIZE=3D2> from</FONT> <BR><FONT SIZE=3D2> sys.v_$mystat =m,</FONT>
<BR><FONT SIZE=3D2> ) p,</FONT> <BR><FONT SIZE=3D2> ( select</FONT> <BR><FONT SIZE=3D2> value</FONT> <BR><FONT SIZE=3D2> from</FONT> <BR><FONT SIZE=3D2> =sys.v_$parameter</FONT>
<BR><FONT SIZE=3D2> ) d</FONT> <BR><FONT SIZE=3D2>/</FONT> </P>
<P><FONT SIZE=3D2>select</FONT>
<BR><FONT SIZE=3D2> =
d.value||'/'||lower(i.instance)||'_ora_'||p.spid||'.trc' =
trace_file_name,</FONT>
<BR><FONT SIZE=3D2> =
d.value||'/'||lower(i.instance)||'_ora_'||p.spid||'.trc.gz' =
trace_file_zipped</FONT>
<BR><FONT SIZE=3D2>from</FONT> <BR><FONT SIZE=3D2> ( select</FONT> <BR><FONT SIZE=3D2> p.spid</FONT> <BR><FONT SIZE=3D2> from</FONT> <BR><FONT SIZE=3D2> sys.v_$mystat =m,</FONT>
<BR><FONT SIZE=3D2> ) p,</FONT> <BR><FONT SIZE=3D2> ( select</FONT> <BR><FONT SIZE=3D2> instance</FONT> <BR><FONT SIZE=3D2> from</FONT> <BR><FONT SIZE=3D2> sys.v_$thread</FONT> <BR><FONT SIZE=3D2> ) i,</FONT> <BR><FONT SIZE=3D2> ( select</FONT> <BR><FONT SIZE=3D2> value</FONT> <BR><FONT SIZE=3D2> from</FONT> <BR><FONT SIZE=3D2> =sys.v_$parameter</FONT>
<BR><FONT SIZE=3D2> ) d</FONT> <BR><FONT SIZE=3D2>/</FONT> </P>
<P><FONT SIZE=3D2>select</FONT>
<BR><FONT SIZE=3D2> d.value || '\ora' || lpad(p.spid, 5, '0') || =
'.trc' trace_file_name,</FONT>
<BR><FONT SIZE=3D2> d.value || '\ora' || lpad(p.spid, 5, '0') || =
'_trc.gz' trace_file_zipped</FONT>
<BR><FONT SIZE=3D2>from</FONT> <BR><FONT SIZE=3D2> ( select</FONT> <BR><FONT SIZE=3D2> p.spid</FONT> <BR><FONT SIZE=3D2> from</FONT> <BR><FONT SIZE=3D2> sys.v_$mystat =m,</FONT>
<BR><FONT SIZE=3D2> ) p,</FONT> <BR><FONT SIZE=3D2> ( select</FONT> <BR><FONT SIZE=3D2> value</FONT> <BR><FONT SIZE=3D2> from</FONT> <BR><FONT SIZE=3D2> =sys.v_$parameter</FONT>
<BR><FONT SIZE=3D2> ) d</FONT> <BR><FONT SIZE=3D2>/</FONT> </P>
<P><FONT SIZE=3D2>clear columns</FONT>
</P>
<P><FONT SIZE=3D2>-----Message d'origine-----</FONT> <BR><FONT SIZE=3D2>De : Place for oracle [<A = HREF=3D"mailto:place4oracle_at_yahoo.com" = TARGET=3D"_blank">mailto:place4oracle_at_yahoo.com</A>]</FONT>
<BR><FONT SIZE=3D2>Envoy=E9 : mar. 16 mai 2000 11:04</FONT> <BR><FONT SIZE=3D2>=C0 : Multiple recipients of list ORACLE-L</FONT> <BR><FONT SIZE=3D2>Objet : Name of Oracle Trace</FONT> </P> <BR>
<P><FONT SIZE=3D2>Hello,</FONT>
</P>
<P><FONT SIZE=3D2>Does someone know how to found the Oracle trace =
name.</FONT>
<BR><FONT SIZE=3D2>We have ORA00512.trc but how can I know that it is =
my</FONT>
<BR><FONT SIZE=3D2>trace.</FONT>
</P>
<P><FONT SIZE=3D2>regards</FONT> <BR><FONT SIZE=3D2>P.T and H.E</FONT> </P> <BR> <P><FONT SIZE=3D2>=3D=3D=3D=3D=3D</FONT><BR><FONT SIZE=3D2>Place4oracle </FONT>
<P><FONT =
SIZE=3D2>__________________________________________________</FONT><BR><FONT SIZE=3D2>Do You Yahoo!?</FONT> <BR><FONT SIZE=3D2>Send instant messages & get email alerts with = Yahoo! Messenger.</FONT>
<BR><FONT SIZE=3D2>-- </FONT> <BR><FONT SIZE=3D2>Author: Place for oracle</FONT> <BR><FONT SIZE=3D2> INET: place4oracle_at_yahoo.com</FONT> </P>
<P><FONT SIZE=3D2>Fat City Network Services -- (858) =
538-5051 FAX: (858) 538-5051</FONT>
<BR><FONT SIZE=3D2>San Diego, =
California -- Public Internet =
access / Mailing Lists</FONT>
<BR><FONT =
SIZE=3D2>---------------------------------------------------------------=-----</FONT>
![]() |
![]() |