DBMS_LOCK.Sleep() considered dangerous?
628567Aug 8 2008 — edited Aug 11 2008I have some PL/SQL that needs to runs continuously, pulling new entries from a table as they are added. I'd use a trigger for this, but need to invoke a synchronous Web service and don't want table inserts to be blocked waiting for the trigger to complete.
So instead my PL/SQL runs in a polling loop which needs to go to sleep for a few seconds whenever it discovers it has run out of things to do.
Based on the documentation, DBMS_LOCK.Sleep is exactly what I need, but one of my colleagues is adamant that it is unnecessary and even dangerous to use it in this situation - partly because of security vulnerabilities.
Can anyone confirm or contradict this?