tst> connect system/manager@tst
Connected.
tst> create or replace trigger trg_logon
2 after logon on database
3 begin if to_char(sysdate, 'mi')='07' and user='U1' then
4 raise_application_error(-20001, 'Access denied!');
5 end if;
6 end;
7 /
Trigger created.
tst> select to_char(sysdate, 'mi') from dual;
TO
--
06
tst> connect u1/u1@tst
Connected.
tst> select to_char(sysdate, 'mi') from dual;
TO
--
07
tst> connect u1/u1@tst
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-20001: Access denied!
ORA-06512: at line 2
Warning: You are no longer connected to ORACLE.