17.00 - Example: Using RoleMembersV - Teradata Database

Teradata Vantage™ - Data Dictionary

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
created_date
June 2020
category
Administration
Programming Reference
featnum
B035-1092-170K

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
. . .        . . .      . . .       . . .