Reputation: 627
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?
Upvotes: 2
Views: 8496
Reputation: 38290
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>;
Upvotes: 4