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: JustAnotherDBA <jadba_at_bellsouth.net>
Date: Fri, 14 Feb 2003 13:22:26 -0600
Message-ID: <Cbb3a.3395$s12.2595@fe03.atl2.webusenet.com>


Try this... PlSql Syntax...

l_sgle_quot_txt := '''' ;
execute immediate 'ALTER SYSTEM KILL SESSION '

                 || l_sgle_quot_txt
                 || to_char(v_sid)
                 || ','
                 || to_char(v_serial#)
                 || l_sgle_quot_txt  ;

Note: If using Plsql, this will require the account that owns this Plsql will have to have the privilege 'alter system' granted directly to it and not just from a role like the DBA role.

"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 - 13:22:26 CST

Original text of this message

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