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
[EMAIL PROTECTED]              Quad/Tech International, Sussex, WI USA

> -----Original Message-----
> From: Deshpande, Kirti [mailto:[EMAIL PROTECTED]]
> 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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to