3

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!

4

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.

  • Always nice when you figure it out yourself, eh! – Max Vernon Feb 4 '16 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.