Resolving InsufficientPrivilege Errors in Redshift

If you are getting the mysterious error:

[ERROR] InsufficientPrivilege: permission denied for schema errors

Then you can easily resolve this by running the following SQL:

GRANT USAGE ON SCHEMA <schema_name> TO <redshift_user>;

Another common error that often follows this, is:

[ERROR] InsufficientPrivilege: permission denied for relation <table>

Luckily, this too can be resolved by running the following SQL:

GRANT USAGE ON SCHEMA <schema_name> TO <redshift_user>;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA <schema_name> TO <redshift_user>;

Leave a Reply

Your email address will not be published.