| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Backup controlfile to trace
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 DBAReceived on Fri Nov 21 2003 - 17:18:18 CST
![]() |
![]() |