Issue: Oracle Logon trigger
based on schema or database level working only from sys & not working from
any other schema
Trigger Code:
create or replace trigger restrictuser
after LOGON ON ADMIN.SCHEMA
BEGIN
if (sys_context('USERENV', 'SESSION_USER')
= 'ADMIN' and
sys_context('USERENV', 'OS_USER')
= 'oracle9i') then
RAISE_APPLICATION_ERROR(-20001,
'Sorry, you are not allowed here!');
END if;
END;
Requirement:
Trigger
should be created in non-sys schema to restrict OS_USER oracle9i from logging
into DB user ADMIN