Finding role IDs and names

To find a role ID when you know the role name, use role_id:

role_id(role_name)

Any user can execute role_id. If the role is valid, role_id returns the server-wide ID of the role (srid). The syssrvroles system table contains an srid column with the role ID and a name column with the role name. If the role is not valid, role_id returns NULL.

To find a role name when you know the role ID, use role_name:

role_name(role_id)

Any user can execute role_name.