How to create a Redshift user with selective schema permissions?

0

How can I create a new user in Redshift who has SELECT access to all existing schemas, but has full permissions to create and modify their own schemas?

1개 답변
1

Create a new user with the desired username using the CREATE USER command, for example:

CREATE USER new_user WITH PASSWORD 'password';

Grant SELECT access to all existing schemas using the GRANT command, for example:

GRANT USAGE ON ALL SCHEMAS IN DATABASE my_database TO new_user;

Grant the user full permissions to create and modify their own schemas using the GRANT command, for example:

GRANT ALL ON SCHEMA my_schema TO new_user;

With these steps, you have created a new Redshift user with SELECT access to all existing schemas and full permissions to create and modify their own schemas.

profile picture
전문가
답변함 일 년 전
  • Thank you very much for your response. I am able to achieve what was required with a small modification in the below statement: instead of this: GRANT ALL ON SCHEMA my_database TO new_user;

    I used this: GRANT CREATE ON DATABASE my_schema TO new_user;

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠