Search notes:

Oracle PL/SQL: Wait (sleep) for the given amount of time with DBMS_LOCK.SLEEP

Executing dbms_lock.sleep(secs) makes the session wait for secs seconds.
begin
   dbms_output.put_line(to_char(sysdate, 'hh24:mi:ss') || ': going to sleep for 3 seconds.');
   dbms_lock.sleep(3);

   dbms_output.put_line(to_char(sysdate, 'hh24:mi:ss') || ': going to sleep for 5 seconds.');
   dbms_lock.sleep(5);

   dbms_output.put_line(to_char(sysdate, 'hh24:mi:ss') || ': finished.');
end;
/
Github repository oracle-patterns, path: /Installed/dbms/lock/sleep.sql

See also

dbms_lock.sleep is deprecated in favor of dbms_session.sleep.
dbms_lock
The SQL Server equivalent of dbms_lock.sleep is roughly waitfor delay.

Index