1
votes

I was unable to alter a share on my trial account.

I tried the following:

ALTER SHARE "SAMPLEDATA_SHARE" ADD ACCOUNTS = BBB12123;

And this was the error:

Share 'SAMPLEDATA_SHARE' does not currently have a database. Database can be added using command 'GRANT USAGE ON DATABASE TO SHARE SAMPLEDATA_SHARE'.

GRANT USAGE ON DATABASE DEMO_DB TO SHARE SAMPLEDATA_SHARE;

as the accountadmin, and see an error that says it does not exist.

SQL compilation error: Share '"xxx.SAMPLEDATA_SHARE"' does not exist or not authorized.

Do I use the role of the creator of the share or another role I need to create?

2

2 Answers

0
votes

You'd have to say a bit more about how your database and share are set (as in what role they were created with and what roles have permissions to them).

I was able to execute the 3 following commands successfully using accountadmin:

create or replace database db_sh;
create or replace share sh_sh;
grant usage on database db_sh to share sh_sh;
0
votes

Could you make sure that you run "use role accountadmin;", before you run the GRANT command? The role you use on your worksheet, could be different than the role you see on the upper corner.