create or replace trigger restrict_login
after logon on database
declare
flag number := 0;
begin
select 1 into flag
from sys.v_$session
where lower(program) like '%sqlplus%' or
lower(program) like '%toad%' and
rownum=1 ;
if flag = 1 then
raise_application_error(-20000, 'You are not Authorised to Access from TOAD/SQLPLUS');
end if;
end;
***********************************
One can check Module_hash /Module from V$session instead of checking the program name. The Module_hash /Module wont change by renaming the exe
No comments:
Post a Comment