Message-Id: <10499.105728@fatcity.com> From: Benhayoune khalid Date: Tue, 16 May 2000 12:01:36 -0000 Subject: 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. ------ =_NextPart_001_01BFBF2E.7C93D450 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable 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@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@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@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). ------ =_NextPart_001_01BFBF2E.7C93D450 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable RE: Name of Oracle Trace

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@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
http://altern.org/place4oracle/place4oracle.html

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with = Yahoo! Messenger.
http://im.yahoo.com/
--
Author: Place for oracle
  INET: place4oracle@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@fatcity.com (note EXACT spelling of = 'ListGuru') and in
the message BODY, include a line containing: UNSUB =