Redshift - Grant users access to system tables

0

Hi,

As a superuser, I'm trying to grant a non-superuser access to system tables. I tried running the below but no results are returned when the user ran the select query. Am I missing anything else? Not able to find specific documentation on this.

ALTER USER user SYSLOG ACCESS UNRESTRICTED;
GRANT SELECT ON TABLE SVV_DATASHARE_OBJECTS TO user;

select * from SVV_DATASHARE_OBJECTS;
已提問 2 年前檢視次數 1187 次
1 個回答
0

Currently, only users who have the ALTER and SHARE privileges can see the shares that they have privileges for. Therefore, SVV_DATASHARE_OBJECTS result is empty for any user that doesn't have permission on datashare, even with permission SYSLOG ACCESS UNSRESTRICTED.

As superuser, you can grant SHARE on the datashare to the user in order for the user to access the views.

Example: grant share on datashare <datashare_name> to <user_name>;

Once this is granted, the user should be able to view the data in SVV_DATASHARE_OBJECTS only for the datashares where access is granted.

One other workaround is to copy the data from SVV_DATASHARE_OBJECTS to a user table and grant SELECT access on this user table to the user.

AWS
支援工程師
已回答 2 年前
  • Is there a way to do this for cross-account datashares? Im my case, I have a datashare from AWS Account 1(Producer) thats accessible on AWS Account 2(Consumer). Running the below on Account 2 returns an error about the datashare not existing;

    grant share on datashare <datashare_name> to <user_name>;

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南