Re: SET ROLE in PL/SQL

From: Roy Varghese <rvarghese_at_ibm.net>
Date: 1997/12/10
Message-ID: <348edbb9.0_at_news1.ibm.net>#1/1


Its not possible to write DDL/DCL statements in PL/SQL or embedded-sql in a front-end directly. You have to call the SET_ROLE function in DBMS_SESSION package to accomplish it. Syntax:

DBMS_SESSION.SET_ROLE( 'RoleName');

Jerry Apfelbaum wrote in message <348E120A.DA60AC75_at_nospamican.ca>...
>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?
>
>--
>========================================================
>Jerry Apfelbaum
>Eastern Sun Group Inc.
>Toronto, Canada
>------------------------------------------------------------------------
>
>(Due to proliferation of spammers, remove 'nospam' my email address.)
>
Received on Wed Dec 10 1997 - 00:00:00 CET

Original text of this message