Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Can someone please verify this for me?

Re: Can someone please verify this for me?

From: Jose Luis Delgado <joseluis_delgado_at_yahoo.com>
Date: Thu, 09 Oct 2003 10:39:31 -0800
Message-ID: <F001.005D2942.20031009103931@fatcity.com>


Sure... there you go!

SQL> create role new_role identified by password;

Role created.

SQL>
  1 create or replace procedure turn_on_role   2 authid current_user
  3 as
  4 begin

  5     execute immediate
  6     'set role new_role';    <<----

  7* end;
SQL> / Procedure created.

SQL> set role none;

Role set.

SQL> select * from session_roles;

no rows selected

SQL> exec turn_on_role;
BEGIN turn_on_role; END;

*
ERROR at line 1:
ORA-01979: missing or invalid password for role 'NEW_ROLE'
ORA-06512: at "SYSMAN.TURN_ON_ROLE", line 5 ORA-06512: at line 1

SQL> ed
Wrote file afiedt.buf

  1 create or replace procedure turn_on_role   2 authid current_user
  3 as
  4 begin

  5     execute immediate
  6     'set role new_role identified by password';
<<-
  7* end;
SQL> / Procedure created.

SQL> exec turn_on_role;

PL/SQL procedure successfully completed.

SQL>


Do you Yahoo!?
The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jose Luis Delgado
  INET: joseluis_delgado_at_yahoo.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Oct 09 2003 - 13:39:31 CDT

Original text of this message

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