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: Problem with roles

Re: Problem with roles

From: Dmitry Zolin <zdg_at_lab321.ru>
Date: Sat, 21 Aug 1999 11:15:13 GMT
Message-ID: <7pm1nu$efk$1@nnrp1.deja.com>


In article <37BD6759.743CBE38_at_usit.uio.no>,   =?iso-8859-1?Q?Nj=E5l?= Ekern <n.a.ekern_at_usit.uio.no> wrote:
> dm_zo_at_my-deja.com wrote:
> > I need to select in PL/SQL package roles granted
> > to the current user.
>
> How about Session_Roles?
>
> Njål
>

It's a pity but variant with "session_roles" can't work:

Connected to:
Oracle8 Enterprise Edition Release 8.0.4.0.0 - Production PL/SQL Release 8.0.4.0.0 - Production

SQL> SELECT
  2 role
  3 FROM
  4 session_roles;

ROLE



CONNECT
RESOURCE
A
C

SQL>
SQL> CREATE OR REPLACE PROCEDURE tryit
  2 IS
  3 BEGIN
  4 dbms_output.put_line('- tryit start -');   5 FOR i IN (SELECT

  6  		  role
  7  		FROM
  8  		  session_roles) LOOP

  9 dbms_output.put_line(i.role);
 10 END LOOP;
 11 dbms_output.put_line('- tryit end -');  12 END;
 13 /

Procedure created.

SQL>
SQL> BEGIN
  2 tryit;
  3 END;
  4 /
- tryit start -
- tryit end -

PL/SQL procedure successfully completed.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Sat Aug 21 1999 - 06:15:13 CDT

Original text of this message

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