Skip to content

Instantly share code, notes, and snippets.

@gagandeep-dba
gagandeep-dba / worksheet.sql
Created September 15, 2020 14:32 — forked from vdparikh/worksheet.sql
Create Read Only Snowflake Group and User
# CREATE A READ ONLY GROUP
create role read_only_svc_rl comment = 'This role is limited to querying tables';
grant role read_only_svc_rl to role sysadmin;
# GRANT USAGE ON DATABASE
grant usage on database databots_prod to role read_only_svc_rl;
# GRANT USAGE ON CURRENT SCHEMAS AND FUTURE SCHEMAS
grant usage on all schemas in database databots_prod to role read_only_svc_rl;
grant usage on future schemas in database databots_prod to role read_only_svc_rl;