ORA-00026: missing or invalid session ID
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: ORA-00026: missing or invalid session ID

  1. #1
    Join Date
    Feb 2001
    Posts
    100

    Question

    Hi all,


    Please tell me what's going wrong with following script.

    DECLARE
    t_command varchar2(200);
    t_cid integer;
    stat integer;
    CURSOR c1 IS
    select SID, SERIAL# from V$SESSION where username= ;
    my_sid NUMBER;
    my_serial# NUMBER;
    BEGIN
    OPEN c1;
    LOOP
    EXIT WHEN c1%NOTFOUND;
    FETCH c1 INTO my_sid, my_serial#;
    t_command := 'alter system kill session 'my_sid, my_serial#'';
    t_cid := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(t_cid,t_command,dbms_sql.native);
    stat := DBMS_SQL.EXECUTE(t_cid);
    END LOOP;
    DBMS_SQL.CLOSE_CURSOR(t_cid);

    close c1;
    END;
    /

    Thanks in advance


    Share on Google+

  2. #2
    Join Date
    Feb 2001
    Posts
    100
    Sorry the command was

    t_command := 'alter system kill session '|| chr(39)||'my_sid, my_serial#'||chr(39);
    Share on Google+

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."
    Share on Google+

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width