2
votes

How can I grant select on all future views in a schema or database. This works fine but I want the role to have access to all future views too:

grant select on view <schema>.<view> to role <role>;

Any ideas?

1

1 Answers

2
votes

Grant on future objects like this (using ACCOUNTADMIN role):

Make sure USAGE is granted on database and schema:

GRANT USAGE ON DATABASE <database> TO ROLE <role>; 
GRANT USAGE ON SCHEMA <database>.<schema> TO ROLE <role>;

Grant select on future objects:

grant select on future tables [views] in schema <database>.<schema> to role <role>;
grant select on future views in schema <database>.<schema> to role <role>;