DBMS_LOCK.SLEEP
From: Ethel Aardvark <bigjobbies_at_hotmail.com>
Date: 11 Jun 2003 09:19:18 -0700
Message-ID: <1a8fec49.0306110819.6e735f88_at_posting.google.com>
Date: 11 Jun 2003 09:19:18 -0700
Message-ID: <1a8fec49.0306110819.6e735f88_at_posting.google.com>
I am running Oracle 9.0.1.3.1 on W2K and dbms_lock.sleep() is confusing me.
If I log in to SQL*Plus and type:
BEGIN dbms_lock.sleep(5); END;
...I get a 5 second delay.
If, however, I put the same block into a procedure:
CREATE OR REPLACE PROCEDURE play IS BEGIN dbms_lock.sleep(5); END play;
...it refuses to compile, claiming that it "...identifier 'DBMS_LOCK'
must be declared".
Why is this?
My gut feeling is that it is an invoker/definer rights issue but not one that I can see (adding "AUTHID CURRENT_USER" or "AUTHID DEFINER" makes no apparent difference).
Please can someone help me - it's driving me mad!
(By the way, changing to "USER_LOCK.SLEEP(500);" works fine.)
ETA Received on Wed Jun 11 2003 - 18:19:18 CEST