Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: DBMS_LOCK + EXECUTE_CATALOG_ROLE
Nevermind about the first issue. I finally remembered that in order to use DBMS_LOCK in my own procedure, SYS has to grant me execute to the DBMS_LOCK package itself.
Thanks to Jonathan Gennick whose answer in the "Getting a Default Role to work" thread triggered my memory.
Andy
Andrew Sigmund wrote:
>
> Two questions regarding DBMS_LOCK usage:
>
> 1) I granted EXECUTE_CATALOG_ROLE to myself, and now, in SQL*PLUS, the
> direct call "EXEC DBMS_LOCK.SLEEP(2);" completes successfully.
> However, when I try to create a stored procedure that does the same
> thing (CREATE PROCEDURE x AS BEGIN DBMS_LOCK.SLEEP(2); END;) I get the
> error "PLS-00201: identifier 'SYS.DBMS_LOCK' must be declared". Why can
> I use it directly, but not in a procedure?
>
> 2) Does anyone have any caveats regarding EXECUTE_CATALOG_ROLE? Does it
> allow the grantee anything I should be aware of?
>
> Thanks,
>
> Andrew Sigmund
> asigmund_at_redshift.com
Received on Sun Jun 04 2000 - 00:00:00 CDT