Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Unable to execute dbms_lock.sleep()
Anurag Minocha wrote:
>
> Hi,
> I am unable to compile a stored procedure in schema other than sys's
> which has the following statement
>
> dbms_lock.sleep(100);
>
> But from the sqlplus i am able to execute the follwing command in any
> schema.
>
> exec dbms_lock.sleep(100);
>
> What might be the problem. I have to use the sleep function in one of
> the stored procedures under the user which has resource,connect and dba
> roles.
>
> Thanks
> anurag
>
> also reply to
> anurag_at_synergy-infotech.com
Don't forget that roles are not enabled in a procedure...
Try this:
SQL> set role none
SQL> exec dbms_lock.sleep(10);
If this fails, then you need execute on dbms_lock to the schema itself or to public.
HTH
--
"Some days you're the pigeon, and some days you're the statue." Received on Mon Aug 09 1999 - 09:24:22 CDT
![]() |
![]() |