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: help with a script

Re: help with a script

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 20 Oct 2001 07:10:46 +0200
Message-ID: <tt2k64788dso1e@corp.supernews.com>

"Ed Lufker" <elufker_at_shimi.swcp.com> wrote in message news:9qqi79$8u6$1_at_sloth.swcp.com...
> Hi All:
>
> I have the following script, but it seems the $ sign in v$session is
> screwing me up, the scripts jumps to a new shell, and all is lost when
> that happens. How do I get around have a the $ sign in my script. The
> script follows
>
> sqlplus -s system/manager << EOF
> set head off
> spool e.out
> 'select sid,serial#,process from v$session where status='SNIPED'';
> exit
> EOF
> sed -n -e '/^SQL/ !p' e.out > e2.out
> while read a b c
> do
> svrmgrl << EOF
> connect internal;
> alter system kill session '$a, $b';
> EOF
> kill -9 $c
> done < e2.out
>
> Thanks for any help here
> Eddie Lufker

use v\$session

Hth

Sybrand Bakker
Senior Oracle DBA Received on Sat Oct 20 2001 - 00:10:46 CDT

Original text of this message

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