Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

snowflake grants for create table

I want to grant Create/Drop/Select/Insert/Delete/Truncate current & future table access to a role.

I did following still having problem.

grant usage on database TESTDB to role TEST_ROLE;
grant usage on schema TESTDB.TESTSCHEMA to role TEST_ROLE;
grant all on future tables in schema TESTDB.TESTSCHEMA to role TEST_ROLE;
grant all on all tables in schema TESTDB.TESTSCHEMA to role TEST_ROLE;

use role TEST_ROLE;
create table TESTDB.TESTSCHEMA.TESTTAB (name varchar(20);

SQL access control error: Insufficient privileges to operate on schema 'TESTSCHEMA'

Thanks

like image 703
Ram Avatar asked Aug 07 '26 22:08

Ram


1 Answers

Creating a table is an action performed in the context of a schema. You need to use GRANT CREATE TABLE ON SCHEMA ...

like image 52
NickW Avatar answered Aug 09 '26 10:08

NickW



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!