Re: script to alter a user with default role

  • From: Yechiel Adar <adar666@xxxxxxxxxxxx>
  • To: lyallbarbour@xxxxxxxxxxxxxxx
  • Date: Thu, 08 Apr 2010 18:59:29 +0300

What is wrong with:
select "alter user " || username || " default role all;" from all_users;

Adar Yechiel
Rechovot, Israel



lyallbarbour@xxxxxxxxxxxxxxx wrote:
Has someone done this before?  it's hurting my brain.
i want to grab all the roles that are granted to a user and add it to an alter statement on the fly. alter user foo default role "granted_role", "granted_role", append, append, append as needed depending on how many roles a user has. I was hoping to make a select 'alter user... ' type of thing. Lyall

Other related posts: