Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: backup controlfile to trace
Here is a snippet from one of our scripts:
- Kirti
($SQLPLUS -s / <<EOT
set head off
set pages 0
set feedback off
set termout off
spool /tmp/$$trace_name.lst
SELECT m.value || '/ora_'||p.spid||'_'|| lower(d.name)||'.trc'
FROM v\$session s, v\$process p, v\$parameter m, v\$database d WHERE m.name = 'user_dump_dest' AND p.addr = s.paddr AND s.sid in (select distinct a.sid from v\$mystat a );
TRCFILE=`cat /tmp/$$trace_name.lst`
rm /tmp/$$trace_name.lst
cp ${TRCFILE} ${CR_CONTROL_FILE_SQL}
-----Original Message-----
Sent: Tuesday, September 17, 2002 2:15 PM
To: Multiple recipients of list ORACLE-L
The way we do it is not 100% but it seems close enough. We run the backup command and then do a descending order listing by date from the trace directory. The first file is the one containing the trace.
If anyone has a beter idea, I am all ears.
Kevin
-----Original Message-----
Sent: Tuesday, September 17, 2002 1:13 PM
To: Multiple recipients of list ORACLE-L
8.1.7
For scripting purposes, what is the logic for finding the trc file from alter database backup controlfile to trace cmd? This seems really stupid not being able to direct the output.
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Ray Stell INET: stellr_at_cns.vt.edu -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Deshpande, Kirti INET: kirti.deshpande_at_verizon.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- 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).Received on Tue Sep 17 2002 - 14:58:41 CDT
![]() |
![]() |