17.10 - Example: Using RoleMembersV - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Data Dictionary

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Administration
Programming Reference
Publication ID
B035-1092-171K
Language
English (United States)

The following query lists all roles and their members:

SELECT CAST(rolename AS CHAR(15)),
       CAST(grantee AS CHAR(20)),
       CAST(grantor AS CHAR(20)),
       whengranted
FROM DBC.RoleMembersV ORDER BY 1,2;

Result:

RoleName     Grantee    Grantor     WhenGranted
----------   --------   --------    --------------------
role_a       user_1     DBA         97-10-15  14:32:59
role_a       user_2     DBA         97-10-15  11:00:01
role_b       user_1     SysFe       98-04-24  09:10:15
. . .        . . .      . . .       . . .