15.10 - UserRoleRightsV - Teradata Database

Teradata Database Data Dictionary

Product
Teradata Database
Release Number
15.10
Content Type
Administration
User Guide
Publication ID
B035-1092-151K
Language
English (United States)

Security

DBC

 

View Column

Data Type

Format

Source Table.Column

RoleName

VARCHAR(128)

UNICODE

NOT NULL

X(128)

Roles.RoleName

DatabaseName

VARCHAR(128)

UNICODE

NOT CASESPECIFIC

NOT NULL

X(128)

Dbase.DatabaseName

TableName

VARCHAR(128)

UNICODE

NOT CASESPECIFIC

NOT NULL

X(128)

TVM.TVMName (NUSI)

ColumnName

VARCHAR(128)

UNICODE

NOT CASESPECIFIC

NOT NULL

X(128)

TVFields.FieldName

AccessRight

CHAR(2) LATIN

UPPERCASE

NOT CASESPECIFIC

NOT NULL

X(2)

AccessRights.AccessRight

GrantorName

VARCHAR(128)

UNICODE

NOT CASESPECIFIC

X(128)

Dbase.DatabaseName

CreateTimeStamp

TIMESTAMP(0)

YYYY-MM-DDBHH:MI:SS

AccessRights.CreateTimeStamp

The UserRoleRightsV view is similar to the AllRoleRightsV view. However, UserRoleRightsV has additional WHERE conditions that restrict the result set to rows belonging to the current role of the user and all roles nested within that.

For information about the possible values for the AccessRight column, see Appendix A: “View Column Values.”

The following SELECT statement returns all privileges granted to the current role of the user and the roles nested within the current role.

==> SELECT CAST(RoleName as CHAR(16)) as RoleName,
           CAST(DatabaseName as CHAR(15)) as Databases,
           CAST(TableName as CHAR(15)) as TVMs,
           CAST(ColumnName as CHAR(10)) as Columns,
           CAST(AccessRight as CHAR(5)) as AccRights,
           CAST(GrantorName as CHAR(15)) as Grantor
    FROM DBC.UserRoleRightsV
    ORDER BY 1,2,3,5;

Result:

RoleName        Databases        TVMs             AccRights  Grantor
--------------  ---------------  ---------------  ---------  ---------
roles017_r1f    roles017_3_db    roles017_3_v2    R          roles017_3
roles017_r2d    roles017_3_db    roles017_3_v2    R          roles017_3