Home
CREATE_TIMER should not be used
Description
The CREATE_TIMER code rule states that the CREATE_TIMER command should not be used. This command is used to create a timer in a PL/SQL block, which is an action that can cause performance issues and should be avoided. Instead, the DBMS_SCHEDULER package should be used to create and manage timers.
Key Benefits
- Time accuracy: CREATE_TIMER should not be used as it does not guarantee accurate time intervals between events.
- Resource-intensive: CREATE_TIMER is resource-intensive and should be avoided when possible.
- Maintenance: CREATE_TIMER requires ongoing maintenance and can become difficult to manage over time.
Non-compliant Code Example
DECLARE timer_id Timer;
one_minute NUMBER(5) := 10000;
BEGIN
timer_id := CREATE_TIMER ('customer_timer', one_minute, NO_REPEAT); --Non compliant code
END;