Skip to content

Instantly share code, notes, and snippets.

@JustinMcNamara74
Last active December 22, 2016 13:45
Show Gist options
  • Save JustinMcNamara74/753edcf4e6f609783e119c76f4606a93 to your computer and use it in GitHub Desktop.
Save JustinMcNamara74/753edcf4e6f609783e119c76f4606a93 to your computer and use it in GitHub Desktop.
Create a user, and give that user select permissions on a given DB

Reference

Create User

CREATE USER User WITH PASSWORD 'password';
Check current perms after each step by using the following command:

\dpu User;

Grants list privileges. Without it, user cannot list tables in aginity when selecting a DB
GRANT SELECT, LIST ON [DB] TO User;
Grants select on all tables in a DB, to a user
GRANT SELECT ON [DB].ALL.TABLE TO User;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment