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: possible to use alter system or alter session commands dynamically?

Re: possible to use alter system or alter session commands dynamically?

From: Brian E Dick <bdick_at_cox.net>
Date: Fri, 14 Feb 2003 14:37:53 GMT
Message-ID: <5b73a.5927$4F3.329795@news2.east.cox.net>


You can't substitute variables inside of a string. You have to substitute the entire string. Maybe something like the following.

EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION :1'       USING to_char(v_sid) || ',' || to_char(v_serial#);

"Ryan Gaffuri" <rgaffuri_at_cox.net> wrote in message news:1efdad5b.0302140555.7bb9a8db_at_posting.google.com...
> I asked this in another thread related to a specific task and got an
> answer on how to do that task, which I appreciate.
>
> However, I'm still wondering if its possible to do this?
>
> I tried:
>
> EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION '':1,:2'''
> USING v_sid, v_serial#;
>
> and it gave me some kind of parsing error. Is it functionally possible
> to do this? Dont need to use it now. Just really curious. Its not in
> the documentation.
Received on Fri Feb 14 2003 - 08:37:53 CST

Original text of this message

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