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: Mike <mike__at_no.spam.wp.pl>
Date: Fri, 22 Aug 2003 09:59:46 +0200
Message-ID: <bi4ihk$p0r$1@flis.man.torun.pl>

"Holger Peine" <peine_at_iese.fraunhofer.de> wrote in message news:3f45bc2e_at_news.fhg.de...
> 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.

Hello

You can get all roles in database:
select * from sys.user$ where type#=0;
Creating function with this kind of query is simple.

HTH

--
regards
Mike
Received on Fri Aug 22 2003 - 02:59:46 CDT

Original text of this message

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