Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: backup controlfile to trace

RE: backup controlfile to trace

From: Jesse, Rich <Rich.Jesse_at_qtiworld.com>
Date: Tue, 17 Sep 2002 12:38:42 -0800
Message-ID: <F001.004D1C0E.20020917123842@fatcity.com>


Cool idea, Kirti, but wouldn't it be better to filter the results with

        AND s.audsid = USERENV('SESSIONID')

instead of running thru v$mystat? USERENV is available at least as far back as 8.0.5.

Not that it matters greatly for this particular purpose, but I know that code around here tends to multiply.

Rich Jesse                           System/Database Administrator
Rich.Jesse_at_qtiworld.com              Quad/Tech International, Sussex, WI USA

> -----Original Message-----
> From: Deshpande, Kirti [mailto:kirti.deshpande_at_verizon.com]
> Sent: Tuesday, September 17, 2002 2:59 PM
> To: Multiple recipients of list ORACLE-L
> Subject: 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
> );

[snip]

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jesse, Rich
  INET: Rich.Jesse_at_qtiworld.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 - 15:38:42 CDT

Original text of this message

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