As we don't want the database user, which has reporting jobs, to connect the database at working hours, following trigger was used to apply this restriction.
CREATE OR REPLACE TRIGGER SYS.DENY_LOGIN
AFTER LOGON
ON DATABASE
BEGIN
IF sys_context('USERENV', 'SESSION_USER') = 'REPORT_USER' THEN
IF to_char(SYSDATE, 'hh24') BETWEEN 08 AND 22 THEN
raise_application_error(-20001,
'Sorry, it is not permitted to logon to the DB at this time as this user');
END IF;
END IF;
END deny_login;
/
Awesome post. your article is really informative and helpful for me and other bloggers too
Oracle Fusion SCM Online Training
Very interesting blog Thank you for sharing such a nice and interesting blog and really very helpful article
Oracle Fusion Technical Online Training
Blogs are something that I like to read.
call girl wirral
The blog was absolutely fantastic! A lot of information is helpful in some or the other way...Great job, keep it up
Oracle Fusion Financials Online Training
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
oracle Fusion Technical online training
Really very helpful article , Thank you for sharing
Spark Scala Training
Spark and Scala Online Training
Hyderabad