Teradata Finding Which User is the CreateUID

Problem:

Looking at the dbc.roles table, I want to find which user created a role.  There is the 4-byte column in the table called CreateUID, which identifies the user that created the role.  Wanting the user name, I struggled to find a matching column in the view dbc.users or dbc.databases views to link for the column CreateUID.

RolesWithCreateUID

Resolution:

Using the dbc.dbase table, I was able to link the CreateUID to a DatabaseID to find out the user name.

sel R.ROLENAME, D.DatabaseNameI as "OWNER"  
from dbc.roles R inner join dbc.dbase D on R.CreateUID = D.DATABASEID 
order by 1

TeradataFindRoleOwner

 

Leave a Comment