0

I have a share(i.e. shareTest_share) in accountAdmin role in one of my reader accounts in snowflake.

Now I want to create a database from this, but from sysAdmin role.

The statement for creating database is:

CREATE or replace DATABASE shareTest_db FROM SHARE mukulanalytics.shareTest_share

This is giving permission issue since I am trying to execute it from the sysAdmin role instead of accountAdmin role which has the access to shareTest_share share.

Error:

SQL access control error: Insufficient privileges to operate on foreign share 'SHARETEST_SHARE'

How can I create a database from share in a different role with share in another role?

2 Answers 2

1

You will have to grant the IMPORT SHARE privilege to SYSADMIN/any other users

use role accountadmin

grant import share on account to sysadmin

use role sysadmin

create database TEST from share <>

https://docs.snowflake.com/en/user-guide/security-access-privileges-shares.html

Sign up to request clarification or add additional context in comments.

Comments

1

the privileges required to achieve this are described here: https://docs.snowflake.com/en/user-guide/security-access-privileges-shares.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.