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: Backup controlfile to trace

Re: Backup controlfile to trace

From: Sybrand Bakker <gooiditweg_at_sybrandb.nospam.demon.nl>
Date: Sat, 22 Nov 2003 00:18:18 +0100
Message-ID: <237trvgra9mtdvib06nd4vhvgc7395ljme@4ax.com>


On Fri, 21 Nov 2003 20:46:03 GMT, "Jack Wang" <nospam_at_nospam.com> wrote:

>All,
>
>I have a job 'alter database backup controlfile to trace'. How can I automate the process of
>locating the trace file and copying to somewhere else? Thanks.
>
>W2K + 9.2.0.3
>
>- Jack
>

The trace file is always in the directory pointed to by user_dump_dest, which can be obtained from v$parameter. The thread id of the user running the command is always in the trace file name.
You can obtain the spid by

select spid from v$session s, v$process p where s.sid = (select sid from v$mystat where rownum = 1) and s.paddr = p.addr

You can probably work out the rest yourself by looking at actual examples.

--
Sybrand Bakker, Senior Oracle DBA
Received on Fri Nov 21 2003 - 17:18:18 CST

Original text of this message

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