Question

Can I create an alert on a user-defined ORA- error?

I want EM to notify me when the following error happens:

begin
raise_application_error(-20118, 'myerror');
end;
/
Was it helpful?

Solution

You could use DBMS_SYSTEM.KSDWRT to write the error to the alert log when you catch the relevant exception.

Then you can configure Enterprise Manager to alert on that error code. You've two options here:

  1. Modify the regex for the existing error log analysis to cover this error code. This would be much easier, but might be a little inflexible.

  2. Write a Metric Extension to check the alert log for this error. This would be a lot more difficult, but would allow you to create customised error messages and responses to this specific error.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top