The Oracle11g alarm function identifies whether the wrong program will be ignored or swallowed
Oracle11g alarm function to identify whether to ignore or swallow the wrong program, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
ORACLE Database 11g provides an alarm feature to help identify programs that ignore or swallow errors.
The following is an example:
ALTER SESSION SET plsql_warnings='enable:all'
CREATE OR REPLACE PROCEDURE test01_demo
AS
BEGIN
DBMS_OUTPUT.PUT_LINE ('I am hereafter')
RAISE NO_DATA_FOUND
EXCEPTION
WHEN OTHERS
THEN NULL
END test01_demo
/
The error prompt can be recognized.
SP2-0804: Procedure created with compilation warnings
SHOW ERRORS
Errors for PROCEDURE PLW6009_DEMO:
LINE/COL ERROR
--
1/1 PLW-05018: unit PLW6009_DEMO omitted optional AUTHID clause
Default value DEFINER used
7 take 6 PLW-06009: procedure "PLW6009_DEMO" OTHERS handler does not end
In RAISE or RAISE_APPLICATION_ERROR
The answer to the question about whether the Oracle11g alarm function will ignore or swallow the wrong program is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.