16.20 - Example: Using RoleMembersV - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ Data Dictionary

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
zzu1512081120577.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

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