Support Questions
Find answers, ask questions, and share your expertise

Unble to create tables through beeline after enabling sentry


Hi am getting the below error while creating database using beeling after enabling sentry. Request to guide me what need to be done after enabling sentry (CDH 5.4.7) like creating any users that have privilages to create databases, tables,roles etc..


0: jdbc:hive2://> create database newtest;
Error: Error while compiling statement: FAILED: SemanticException No valid privileges
Required privileges for this query: Server=server1->action=*; (state=42000,code=40000)
0: jdbc:hive2://>


Master Guru
On a freshly configured Sentry+Hive configuration, login as "hive" user and issue "CREATE ROLE admin;", followed with "GRANT ALL ON SERVER server1 TO ROLE admin;" and "GRANT ROLE admin TO GROUP hive;".

Now you can act as an admin as the "hive" user. After this, grant your users roles and access rights as you prefer. See examples at bottom of to get a grip on how to do that.


Hi.. I am getting an error while creating database. 

0: jdbc:hive2://localhost:10000> create database zza;

Error: Error while compiling statement: FAILED: ParseException line 2:0 missing EOF at 'create' near 'databases' (state=42000,code=40000)