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;
/

5 Responses so far.

  1. Sravani says:

    Thank you for sharing such a nice and interesting blog with us. I have seen that all will say the same thing repeatedly. But in your blog, I had a chance to get some useful and unique information.

    Oracle Fusion HCM Online Training

  2. sushma says:

    Hey Really Thanks for sharing the best information regarding category, hope you will write more great blogs.
    Oracle Fusion Financials Oracle Training

  3. Naga says:

    Very interesting blog, keep posting such an informative post.

    Oracle Fusion Financials Online Training

  4. Awesome post. your article is really informative and helpful for me and other bloggers too

    Oracle Fusion SCM Online Training

  5. Thank you for sharing such a nice and interesting blog and really very helpful article

    oracle fusion financials online training

Powered by Blogger.

Page Views

- Copyright © Emre Baransel - Oracle Blog -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -