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



  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);

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Jeff Hunter

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