Managing roles
You can grant privileges to roles, rename roles, and alter role owners.
Granting privileges to roles
You can assign privileges to roles using the GRANT command.
Before you begin
Procedure
Run the
grant <privileges> on <object> to <rolename>
command. To understand more about the privileges which you can set to a role, you can refer to GRANT command detail.
Note: Before you activate permissions, you need to set a role. To bring it to normal, set the role
to none.
Altering role names
You can use the ALTER ROLE command to change the name of a role.
Procedure
Run the
alter role <name> rename to <new name>;
command to alter the
name of a role.
Altering role owners
You can use the ALTER ROLE command to assign different owners to a role.
Procedure
Run the
alter role <name> owner to <owner>;
to alter the owner of a
role.
Note: When you create or modify an object after setting the role, the role will be the owner of that
object.