-
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
-
Sorry the command was
t_command := 'alter system kill session '|| chr(39)||'my_sid, my_serial#'||chr(39);
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|