Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Set Role From a Stored Procedure
> Is anyone familiar with a way to issue a Set Role from within a stored
> procedure? Thanks.
>
Hello!
Use DBMS_SQL package.
example:
l
1 CREATE OR REPLACE PROCEDURE set_role
2 IS
3 cursor_handle INTEGER;
4 BEGIN
5 cursor_handle := DBMS_SQL.OPEN_CURSOR; 6 DBMS_SQL.PARSE(cursor_handle,'SET ROLE ALL',DBMS_SQL.V7); 8 DBMS_SQL.CLOSE_CURSOR(cursor_handle);7* END;
SQL> exec set_role
PL/SQL procedure successfully completed.
Best wishes
Victor L. Artchakov
Khabarovsk Russia
victor_at_rias.khv.ru
Received on Fri Jun 27 1997 - 00:00:00 CDT
![]() |
![]() |