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: How to determine in PL/SQL if a user has a certain role?

Re: How to determine in PL/SQL if a user has a certain role?

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Fri, 22 Aug 2003 20:38:30 +0200
Message-ID: <plockvcdl4op6c3vbb35rukpmfjqp0l6oh@4ax.com>


On Fri, 22 Aug 2003 08:45:46 +0200, Holger Peine <peine_at_iese.fraunhofer.de> wrote:

>Hello,
>
>I need to determine if a certain user has a certain role in a PL/SQL
>procedure, something like
>
>IF 'fred' HAS ROLE 'clerk' THEN ...
>
>However, I cannot find a role operator (like the hypothetical HAS ROLE
>above) in the PL/SQL reference. What is the proper way to achieve my
>need?
>
>Thanks for your advice,
>Holger.

Check out the functions in the SYS schema and the dbms_standard package
No need to do anything with the sys schema, and you should *never ever* refer to the xxx$ in your code directly, as they are subject to change.

Regards

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Fri Aug 22 2003 - 13:38:30 CDT

Original text of this message

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