Search notes:

PLS-00201: identifier 'DBMS_LOCK' must be declared

If the user who is trying to execute dbms_lock.sleep receives the error message PLS-00201: identifier 'DBMS_LOCK' must be declared, this is likely because he wasn't granted EXECUTE on the dbms_lock package.
In this case, the user should try dbms_session.sleep

Index