Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

question about explicit access rights - response (5) by Tread831

$
0
0
Using the script above we could do something like this :           Select RMM.Grantee           , RMM.RoleName           , ARR.AccessRight           , ARR.Databasename           , ARR.Tablename           From DBC.RoleMembers RMM           Join DBC.AllRoleRights ARR           ON RMM.RoleName = ARR.RoleName           Where ARR.Databasename = '<dbname here>'           And (ARR.Tablename = 'All' or ARR.Tablename = '<tablename here>')           AND RMM.Grantee = '<userID here' ----------------- This catches the "ALL" case as well as the actual table name  but may have a drawback as it allows for duplicates -------------------------------------- and to remove duplicates try this Select distinct(RMM.RoleName), RMM.Grantee , ARR.AccessRight From DBC.RoleMembers RMMJoin DBC.AllRoleRights ARR ON RMM.RoleName = ARR.RoleName Where ARR.Databasename = '<DBname here>' And (ARR.Tablename = 'All' or ARR.Tablename = '<TABLE NAME HERE>') AND RMM.Grantee = '<USER ID HERE>'   - I know this is way late but it helps to share this info for the next person who needs it. Work smarter!  Google it!

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>