Using the system table ROLEPRIVILEGES, you can determine the following database information, among other things:
·
All privileges that
have been given to role NEW_ROLE
directly for your own table MYTABLE. Privileges granted indirectly, that is, granted for
table MYTABLE via a different role, are not displayed.
SELECT
privileges
FROM DOMAIN.ROLEPRIVILEGES
WHERE grantee = 'NEW_ROLE'
AND owner = user
AND tablename = 'MYTABLE'
·
All roles that were
granted to role NEW_ROLE. Specification of who granted the role.
SELECT
role, grantor
FROM DOMAIN.ROLEPRIVILEGES
WHERE grantee = 'NEW_ROLE'
AND role IS NOT NULL
All roles: see ROLES
All roles that are used as a default value: see ROLES
All roles that are active in the current database session: see SESSION_ROLES