SQL Script To Grant Select on All Views Within a Database

Database

SQL Script To Grant Select on All Views Within a Database

I have a need where i need grant Select on all Views in the database

Thanks in Advance

Tags (1)
2 REPLIES
Junior Contributor

Re: SQL Script To Grant Select on All Views Within a Database

If you follow Teradata's recommendations to seperate tables and views into different databases, it's a simple GRANT SELECT ON myDb TO myUser;

Otherwise create the GRANT statements FROM dbc.TablesV WHERE TableKind = 'V'

Teradata Employee

Re: SQL Script To Grant Select on All Views Within a Database

Try following SQL statements to grant access to database DB on view VW.

 

GRANT SELECT ON VW TO DB WITH GRANT OPTION;
GRANT INSERT ON VW TO DB WITH GRANT OPTION;
GRANT DELETE ON VW TO DB WITH GRANT OPTION;