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.)
Thanks in advance,