To prevent a user from connecting, you can lock the account:
ALTER USER usr ACCOUNT LOCK;
If you want to disconnect all user sessions, you can use the ones described in another SO :
BEGIN
FOR x IN (SELECT Sid, Serial
EXECUTE IMMEDIATE 'Alter System Kill Session ''' || x.Sid || ','
|| x.Serial
END LOOP;
END;
source
share