DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Controlfile trace name

  1. #1
    Join Date
    Feb 2002
    Location
    Brussels-Belgium
    Posts
    8

    Controlfile trace name

    Hi everyone,

    In my hot backup script (NT) I do a 'alter database backup controlfile to trace' and then I want to copy that trace to another place. How can I recognise which of the files in user_dump_dest is my controlfile trace? It seems that a processid (v$process.SPID) is involved but I cannot figure out how to find this processid. The v$bgprocess.PADDR for description='trace writer process' is always 00?
    Any idea?

    Thanks!

    Dorian

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    have a look inside them.

    To be honest you shoudlnt have any trace files in there - so myabe you should ook at why you are getting trace file generated as well

  3. #3
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    If you have version 9.2 (or maybe 9.1) you should be able to "alter database backup controlfile to trace as 'file-name'". It's broken in versions before that. http://www.dbasupport.com/forums/sho...threadid=34856

  4. #4
    Join Date
    Feb 2002
    Location
    Brussels-Belgium
    Posts
    8
    Thanks!

    Unfortunately I work on 8.1.7 on NT...
    So there is no way to know the process which created the trace file?
    I know I shouldn't have other traces in there, but still, I want to have it this script correct.

    Dorian

  5. #5
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Code:
    select
      'ORA' || ltrim(to_char(p.spid,'09999')) || '.TRC' as trace_file
    from v$process p, v$session s
    where p.addr = s.paddr
    and s.sid = 
     (select sid from v$mystat where rownum=1);
    http://www.dbasupport.com/forums/sho...threadid=22639
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  6. #6
    Join Date
    Sep 2001
    Location
    Ohio
    Posts
    334
    Okay - I have what may seem like a silly question.

    What determines the name of the trace file, besides just the pid? From jmodic's example, his are ORA{PID}.TRC. On my 8.1.7 instances (all on AIX), my trace files are ora_{pid}_{sid}.trc. But on my 9.2 (AIX & Windows), the trace files are {sid}_ora_{pid}.trc.

    I've never set this specifically, and don't think you can.

    Why the difference? What version are you running jmodic?

  7. #7
    Join Date
    Sep 2001
    Location
    Ohio
    Posts
    334
    Code:
    select
      'ORA' || ltrim(to_char(p.spid,'09999')) || '.TRC' as trace_file
    from v$process p, v$session s
    where p.addr = s.paddr
    and s.sid = 
     (select sid from v$mystat where rownum=1);
    Be aware too, that PID is 6 digits in 9i, 5 digits in 8i. So if you were using 9i, you would need
    Code:
    ltrim(to_char(p.spid,'099999'))
    Obvious to most, but just thought I'd mention it.

  8. #8
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by jodie
    Okay - I have what may seem like a silly question.

    What determines the name of the trace file, besides just the pid?
    Well, as you've noticed, what determines the structure of the trace file is platform and version specific. However the structure and the SID for a given instance is allways the same, so the only dynamic thing in trace name for a given instance is process id.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width