HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Teradata 15: Failed [5315 : HY000] An owner referenced by user does not have SELECT WITH GRANT OPTION access to DBC.RoleMembersV.RoleName

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
ownerdbcreferencedrolenamewithusergrantrolemembersvoption5315

Problem

I am using Teradata 15. Using a powerful database user sysdba, I created the following view:

REPLACE VIEW DBA_TABLES_TEST.ROLE_ALL_APP_USERS AS
SELECT   A.ROLENAME 
   FROM  DBC.ROLEMEMBERSV A
   WHERE A.ROLENAME LIKE 'TG%';


I got the following errors:

Executed as Single statement.  Failed [5315 : HY000] An owner referenced by user does not have SELECT WITH GRANT OPTION access to DBC.RoleMembersV.RoleName. 
Elapsed time = 00:00:00.015 

STATEMENT 1: Select Statement failed.


Then I used DBC to grant sysdba the select right, but try the view again, it did not work:

GRANT SELECT ON DBC TO SYSDBA WITH GRANT OPTION;


Any idea how can I grant the correct rights to sysdba?

Thank you so much!

Solution

Oh, I just figured out the correct grant statement. All my views are working now. I can audit my user/database/role permissions using these views.

GRANT SELECT ON DBC TO DBA_TABLES_TEST WITH GRANT OPTION;


Thank you.

Code Snippets

GRANT SELECT ON DBC TO DBA_TABLES_TEST WITH GRANT OPTION;

Context

StackExchange Database Administrators Q#128327, answer score: 5

Revisions (0)

No revisions yet.