Difference between revisions of "Amazon Redshift: grant read only privileges to user"

From wikieduonline
Jump to navigation Jump to search
Line 17: Line 17:
 
:<code>[[\dn+]]</code>
 
:<code>[[\dn+]]</code>
  
1) Grant permssions to schema:
+
1) Grant permissions to schema:
 
:<code>[[GRANT USAGE ON SCHEMA]] your_schema TO GROUP your_group;</code>
 
:<code>[[GRANT USAGE ON SCHEMA]] your_schema TO GROUP your_group;</code>
 
:Output: GRANT
 
:Output: GRANT
Line 26: Line 26:
 
3) Verify changes:
 
3) Verify changes:
 
:<code>[[\dn+]]</code>
 
:<code>[[\dn+]]</code>
 
 
  
 
== Related ==
 
== Related ==

Revision as of 08:17, 12 May 2022

For users

0) List schemas and priviles:

\dn+

1) Grant permssions to schema:

GRANT USAGE ON SCHEMA your_schema TO your_user;
Output: GRANT

2) Grant permissions on tables in the schema:

GRANT SELECT ON ALL TABLES IN SCHEMA your_schema TO your_user;
Output: GRANT

3) Verify changes:

\dn+

For groups

0) List schemas and priviles:

\dn+

1) Grant permissions to schema:

GRANT USAGE ON SCHEMA your_schema TO GROUP your_group;
Output: GRANT

2) Grant permissions on tables in the schema:

GRANT SELECT ON ALL TABLES IN SCHEMA your_schema TO GROUP your_group;
Output: GRANT

3) Verify changes:

\dn+

Related

See also

Advertising: