Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Name of Oracle Trace

RE: Name of Oracle Trace

From: Benhayoune khalid <benhayoune_at_maroclear.co.ma>
Date: Tue, 16 May 2000 12:01:36 -0000
Message-Id: <10499.105728@fatcity.com>


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

  ) p,
( select

      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

  ) p,
( select

      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

  ) p,
( select

      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



Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/
--=20
Author: Place for oracle
  INET: place4oracle_at_yahoo.com
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.&nbsp; It can be used interactively, or from = other scripts.</FONT>
<BR><FONT SIZE=3D2>The name is saved in the SQL*Plus define = &amp;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>&nbsp; d.value || '/ora_' || p.spid || '.trc' = trace_file_name,</FONT>
<BR><FONT SIZE=3D2>&nbsp; d.value || '/ora_' || p.spid || '.trc.gz' = trace_file_zipped</FONT>

<BR><FONT SIZE=3D2>from</FONT>
<BR><FONT SIZE=3D2>&nbsp; ( select</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.spid</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; from</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.v_$mystat =
m,</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.v_$session = s,</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.v_$process = p</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; where</FONT> <BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m.statistic# =3D 1 = and</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s.sid =3D m.sid = and</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.addr =3D = s.paddr</FONT>
<BR><FONT SIZE=3D2>&nbsp; ) p,</FONT>
<BR><FONT SIZE=3D2>&nbsp; ( select</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; from</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
sys.v_$parameter</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; where</FONT> <BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name =3D = 'user_dump_dest'</FONT>
<BR><FONT SIZE=3D2>&nbsp; ) d</FONT>
<BR><FONT SIZE=3D2>/</FONT>
</P>

<P><FONT SIZE=3D2>select</FONT>
<BR><FONT SIZE=3D2>&nbsp; =
d.value||'/'||lower(i.instance)||'_ora_'||p.spid||'.trc' = trace_file_name,</FONT>
<BR><FONT SIZE=3D2>&nbsp; =
d.value||'/'||lower(i.instance)||'_ora_'||p.spid||'.trc.gz' = trace_file_zipped</FONT>

<BR><FONT SIZE=3D2>from</FONT>
<BR><FONT SIZE=3D2>&nbsp; ( select</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.spid</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; from</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.v_$mystat =
m,</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.v_$session = s,</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.v_$process = p</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; where</FONT> <BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m.statistic# =3D 1 = and</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s.sid =3D m.sid = and</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.addr =3D = s.paddr</FONT>
<BR><FONT SIZE=3D2>&nbsp; ) p,</FONT>
<BR><FONT SIZE=3D2>&nbsp; ( select</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; instance</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; from</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.v_$thread</FONT>
<BR><FONT SIZE=3D2>&nbsp; ) i,</FONT>
<BR><FONT SIZE=3D2>&nbsp; ( select</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; from</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
sys.v_$parameter</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; where</FONT> <BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name =3D = 'user_dump_dest'</FONT>
<BR><FONT SIZE=3D2>&nbsp; ) d</FONT>
<BR><FONT SIZE=3D2>/</FONT>
</P>

<P><FONT SIZE=3D2>select</FONT>
<BR><FONT SIZE=3D2>&nbsp; d.value || '\ora' || lpad(p.spid, 5, '0') || = '.trc' trace_file_name,</FONT>
<BR><FONT SIZE=3D2>&nbsp; d.value || '\ora' || lpad(p.spid, 5, '0') || = '_trc.gz' trace_file_zipped</FONT>

<BR><FONT SIZE=3D2>from</FONT>
<BR><FONT SIZE=3D2>&nbsp; ( select</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.spid</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; from</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.v_$mystat =
m,</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.v_$session = s,</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.v_$process = p</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; where</FONT> <BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m.statistic# =3D 1 = and</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s.sid =3D m.sid = and</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p.addr =3D = s.paddr</FONT>
<BR><FONT SIZE=3D2>&nbsp; ) p,</FONT>
<BR><FONT SIZE=3D2>&nbsp; ( select</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; from</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
sys.v_$parameter</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; where</FONT> <BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name =3D = 'user_dump_dest'</FONT>
<BR><FONT SIZE=3D2>&nbsp; ) 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>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://altern.org/place4oracle/place4oracle.html" = TARGET=3D"_blank">http://altern.org/place4oracle/place4oracle.html</A></= FONT>
</P>

<P><FONT =

SIZE=3D2>__________________________________________________</FONT>
<BR><FONT SIZE=3D2>Do You Yahoo!?</FONT> <BR><FONT SIZE=3D2>Send instant messages &amp; get email alerts with = Yahoo! Messenger.</FONT>
<BR><FONT SIZE=3D2><A HREF=3D"http://im.yahoo.com/" = TARGET=3D"_blank">http://im.yahoo.com/</A></FONT>
<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Author: Place for oracle</FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: place4oracle_at_yahoo.com</FONT>
</P>

<P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) = 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT SIZE=3D2>San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT>
<BR><FONT =

SIZE=3D2>---------------------------------------------------------------=
-----</FONT>
<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an = E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of = 'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB = Received on Tue May 16 2000 - 07:01:36 CDT

Original text of this message

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