Hi,
Is there delay function in Oracle?
Thanks
Printable View
Hi,
Is there delay function in Oracle?
Thanks
dbms_lock.sleep
How I can Use this Package ?
Any Example !
Jani
Code:
connect internal
set serveroutput on
begin
dbms_output.enable(20000);
dbms_lock.sleep(30);
dbms_output.put_line('Hmm had a nice nap');
end;
/
DECLAREQuote:
Originally posted by Jani
How I can Use this Package ?
Any Example !
Jani
X DATE;
BEGIN
SELECT SYSDATE INTO X FROM DUAL;
DBMS_LOCK.SLEEP(12);
END;
/
Oracle will wait for 12 seconds.
I recommend you the following book:
Oracle Built-in Packages by Feuerstein, Steven
Paperback. O'Reilly & Associates, US, UK, 199804.
ISBN: 1565923758.
When using DBMS_LOCK.SLEEP one must be aware of the bug that is present in *all* Oracle editions so far, AFAIK even in 9.0.1. The bug is described at the end of the following article:
http://www.jlcomp.demon.co.uk/faq/sleep.html
Wow, you've really researched the sleep function!!
Thanks for the link!
Orcale Corp. should pay you for your effords!