Creating roles

A role is a potential grantee or grantor of privileges and of other roles. Similarly to a user, a role can own schemas and other objects. Roles can own database objects such as tables or functions. By using roles, you can also assign privileges. You can create roles that are available across all databases on the system.

Procedure

  • Create a role using the create role <name> with admin <grantor >; command.
  • Create a role with admin rights by running the create role <name> as admin; command.
    Note: Similarly to group objects, roles are also global objects.