6

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!

Paul White
  • 94,921
  • 30
  • 437
  • 687
dave
  • 367
  • 3
  • 4
  • 15

1 Answers1

5

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.

dave
  • 367
  • 3
  • 4
  • 15