Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Unable to execute dbms_lock.sleep()

Re: Unable to execute dbms_lock.sleep()

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Mon, 09 Aug 1999 22:24:22 +0800
Message-ID: <37AEE496.4B2B@yahoo.com>


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
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Mon Aug 09 1999 - 09:24:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US