SYSROLEGRANT System View

The SYSROLEGRANT system view contains one row for each grant of a system or user defined role. The underlying system table for this view is ISYSROLEGRANT.

Column name Data type Description
grant_id UNSIGNED INT ID used to identify each GRANT statement.
role_id UNSIGNED INT ID of the role being granted, as per ISYSUSER.
grantee UNSIGNED INT ID of the user being granted the role, as per ISYSUSER.
grant_type TINYINT
Describes type of grant using 3 digits. The first digit is whether privilege has been granted. The second digit is whether administration rights have been given. The third digit is whether system privileges are inheritable.
  • 001 – Privilege granted, with no inheritance, and no administration rights. Applicable only for legacy non-inheritable authorities except SYS_AUTH_DBA_ROLE and SYS_AUTH_REMOVE_DBA_ROLE
  • 101 – Privilege granted, with inheritance, but no administration rights.
  • 110 – Only administration rights have been granted.
  • 111 – Privilege granted, with inheritance, and with administration rights
  • 001 – Privilege granted, with administration rights, but no inheritance. Applicable only for legacy authorities SYS_AUTH_DBA_ROLE and SYS_AUTH_REMOVE_DBA_ROLE.
grant_scope TINYINT

Used by SET USER and CHANGE PASSWORD to set the scope of the grant. Values can be one or more of the following:

  • 001 – User list.
  • 010 – ANY WITH ROLES
  • 110 – ANY
grantor CHAR (128) The unique identifier of the grantor of the role.

Constraints on underlying system table

PRIMARY KEY (grant_ID)

UNIQUE Index (role_id, grantee, grant_scope)