I have the request to setup an eMail notification if the FRA usage of the database (Oracle 19c Standard Edition) exceeds a certain limit.
My idea is the following:
- Create a stored procedure that retrieves the current FRA utilization and if it is above a threshold, raise an exception
- Create an DBMS_SCHEDULER Oracle Job that calls that procedure every day
- Create DBMS_SCHEDULER.add_job_email_notification that fires an eMail if the job fails.
Unfortunately this doesn't seem to work because raising an exception in the stored procedure in (1) does not cause the job to fail.
Is there maybe an easier way to solve that or another way to trigger eMail notification for my purpose?
Thanks!