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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SET ROLE in PL/SQL

Re: SET ROLE in PL/SQL

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/12/10
Message-ID: <348e8a0d.6771296@inet16>#1/1

On Tue, 09 Dec 1997 22:52:43 -0500, Jerry Apfelbaum <japfelba_at_ican.ca> wrote:

>We have not had any success with trying to execute the SQL command:
> SET ROLE ThisRole IDENTIFIED BY ThisPassword;
>using dynamic SQL in either an anonymous PL/SQL block or in a stored
>procedure.
>
>Can this be done? If not, is there an explanation as to why this is not
>permitted?

It cannot be done. Stored procedures are not enabled in roles. Even if you could enable a role via a stored procedure, it would not change what a stored procedure could do since priveleges are computed at procedure compile time, not at run time -- even if you changed the set of active roles, it would have no effect on the procedure.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Wed Dec 10 1997 - 00:00:00 CST

Original text of this message

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