Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

grant role to several users

Me_101May 7 2014 — edited May 7 2014

Hi gurus,

I'm not sure if I am in the correct forum or this thread should be in pl/sql forum, so please move it if you consider necessary.

Im working on 11.2.0.3 windows 7 and have to grant one role to several users (all users that start with "OPS$"), but i can't find a solution for myself, so i need your knowledge:

I tried:

SQL>

  1  begin

  2    for c1 in (select username from dba_users where username like 'OPS$%') loop

  3  execute immediate

  4       'grant TP_RW to ' || c1.username;

  5    end loop;

  6* end;

begin

*

ERROR at line 1:

ORA-00933: SQL command not properly ended

ORA-06512: at line 3

what i am doing wrong?

This post has been answered by Me_101 on May 7 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2014
Added on May 7 2014
7 comments
2,953 views