Skip to Main Content

SQL & PL/SQL

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!

alter user username default role

83292Jun 18 2003 — edited Jun 18 2003
Hello all,
I am new to Oracle programming and I was wondering if anyone can help me with the trouble I have. I have a bunch of Roles on the database that I have granted to users and made them as default. Now I need to revoke one of the roles (X) from the list of roles that I granted to users and grant another role (Y) and make it as default in addition to the other roles that that have as default. All the users don't have the exact same roles assigned to them. I other words I have to write a DYNAMIC script which accomplishes this...

alter user user1 default role y,a,b,c;
alter user user2 default role y,a,b;
alter user user2 default role y,a,b,d,e;
...
...

where y is the newly created role and a,b,c,d,e are the previously existing roles. Remember they have to be default.

Any help would be greatly appreciated.

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2003
Added on Jun 18 2003
6 comments
3,387 views