BEGIN FOR c IN (SELECT sid,serial# FROM gv$session WHERE username='SUPERMAG') LOOP BEGIN EXECUTE IMMEDIATE 'alter system disconnect session ''' || c.sid || ',' || c.serial# || ''' immediate'; EXCEPTION WHEN OTHERS THEN NULL; END; END LOOP; END;