AFAIK neither DISCONNECT nor CONNECT are even standard SQL commands! They are SQL*Plus (or maybe any other client tool's) commands.
To restrict user access you simply need to raise application error. So inside your trigger, instead of
....
EXECUTE IMMEDIATE 'DISCONNECT';
....
use
....
RAISE_APPLICATION_ERROR(-20001, 'Sorry, you are not allowed here!');
....




Reply With Quote