10 Eylül 2021 Cuma

Oracle Session Kill PLSQL Code

 

BEGIN

  FOR REC_ IN (select sid,serial# from v$session where username='ABC' AND status='INACTIVE')

  LOOP

      EXECUTE IMMEDIATE 'alter system kill session ''' || REC_ .sid  || ',' 

        || REC_ .serial# || ''' immediate';

  END LOOP;

END;


Share:

0 yorum:

Yorum Gönder

Blog Arşivi