Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.
BEGIN DBMS_SCHEDULER.create_job( job_name => 'Monitor_AGENT_USER', job_type => 'PLSQL_BLOCK', job_action => q'[ DECLARE crlf VARCHAR2(2) := CHR(13) || CHR(10); message_v VARCHAR2(32000); BEGIN FOR i IN (SELECT user_id, account_status, lock_date FROM dba_users WHERE username = 'AGENT_USER' AND account_status = 'LOCKED') LOOP message_v := message_v || i.user_id || 'is in ' || i.account_status || 'status since ' || TO_CHAR(i.lock_date, 'MM/DD/YYYY') || crlf; END LOOP; UTL_MAIL.send( sender => 'firstname.lastname@example.org', recipients => 'email@example.com', subject => 'AGENT_USER Account is LOCKED', MESSAGE => message_v ); END; ]', start_date => TO_DATE('14:00', 'HH24:MI'), repeat_interval => 'freq=minutely;interval=30', enabled => TRUE, comments => 'AGENT_USER monitor account lock' ); END; /
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.