How to add external users in Oracle 11g to a role?

mohammadzahid
mohammadzahid used Ask the Experts™
on
Hi,

We have a list of users that are Windows authenticated in sqlplus, but I cannot figure out a way to add them to a role so that they can execute a procedure. What is the command to add an external user to a role?

Procedure name = sp_test123  

SQL> grant execute on sp_test123 to Roleabc   <Granting execute to a role>

Rolename = Roleabc  

User1 = OPS$ABC\U1  

User2 = OPS$ABC\U2  
Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2015

Commented:
Hi

Oracle Administration Assistant for Windows can create and grant local and external database roles to Windows domain users and global groups.
http://docs.oracle.com/cd/B28359_01/win.111/b32010/external.htm
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
Should be the same way you grant the role to any user:
grant Roleabc to OPS$ABC\U1 ;
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
Looks like the '\' is an invalid character.  Try with double quotes:
grant Roleabc to "OPS$ABC\U1";

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial