Fully managed cloud. 30-day FREE full featured trial. Start Now
cancel
Showing results for 
Search instead for 
Did you mean: 

Grant 'Create Table ' for Single Schema to Role

mmoltisanti
Padawan

We are trying to grant 'CREATE Table' to a specific Role for a single Schema. but it does not seem to work. The only thing we've found that allows the CREATE function, is 'CREATE ANY Table' and that allows to wide a permission (across schemas).

 

How do I accomplish this ?

Role = Developer

Schema = 'DEV'

Want to grant Developer 'Create Table' on DEV....... ONLY ! and no other schema.

 

 

1 REPLY 1

exa-Uwe
Moderator
Moderator

Hi mmoltisanti,

the trick is essentially that you can make a role the owner of a schema in Exasol. Like in this example:

create schema dev_schema;
create role dev_role;
create user dev_user identified by "exasol";
grant create session, create table to dev_user;
alter schema dev_schema change owner dev_role;
grant dev_role to dev_user;
impersonate dev_user;
open schema dev_schema;
create table dev_table (n int);

Hope that helps.

Best regards

Uwe