It seems that this prohibits developers from changing codes during non-office hours.
create or replace PROCEDURE secure_dml IS BEGIN IF TO_CHAR (SYSDATE, 'HH24:MI') NOT BETWEEN '08:00' AND '18:00' OR TO_CHAR (SYSDATE, 'DY') IN ('SAT', 'SUN') THEN RAISE_APPLICATION_ERROR (-20205, 'You may only make changes during normal office hours'); END IF; END secure_dml;
or you could call the procedure from a trigger on whatever table you wanted.
BEGIN secure_dml; <<do some DML>> END;
KinsaKaUy? wrote:Looking at the example posted, there's not much to learn.
I am browsing lots of procedures in our database, so I could learn different technics from them.