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: SQLPLUS issue from ksh script

Re: SQLPLUS issue from ksh script

From: Radoulov, Dimitre <cichomitiko_at_gmail.com>
Date: Fri, 26 May 2006 20:30:30 +0200
Message-ID: <00a001c680f2$79d8cc50$3508310a@MPILA9>


> It works in "pure" sqlplus, just not in the script.
>
> Ideas? Thanks.

sqlplus "/ as sysdba" <<EOJ
declare

  STR VARCHAR2(2000); begin

  for x in (select * from v\$session) loop     IF x.user# = 27 then
      str := ' alter system kill session ''' || x.sid || ',' || x.serial# ||'''';

      execute immediate str;
    End if;
  END LOOP;
end;
/

EOJ Regards
Dimitre

--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 26 2006 - 13:30:30 CDT

Original text of this message

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