How to limit access to the database to certain hours
                                                 Last update (2008-02-15 12:38:11)
                                                                                                                   Date added (2008-02-15 12:37:44)

Summary
You can create a trigger to limit the database logon at certain hours. For example to not allow access between 0..6 and 9..24
create or replace trigger limit_logon after logon on database
declare dba number;
begin
    if to_char(sysdate,'HH24') between 9 and 24 or to_char(sysdate,'HH24') between 0 and 6
    then raise_application_error(-20001,'Not allowed to logon database during this time');
    end if;
end
/
Reviews
Filters
Search