cancel
Showing results for 
Search instead for 
Did you mean: 
Warehousing & Analytics
cancel
Showing results for 
Search instead for 
Did you mean: 

Error with GRANT in Databricks SQL

Prabakar
Esteemed Contributor III
Esteemed Contributor III

While trying to GRANT SELECT permissions for a Database or Table it reports the below error.

Error running query
Operation not allowed: GRANT(line 1, pos 0)
== SQL ==
GRANT SELECT ON DATABASE my_database TO `my_table` LIMIT 1000
^^^

1 ACCEPTED SOLUTION

Accepted Solutions

Prabakar
Esteemed Contributor III
Esteemed Contributor III

In Databricks SQL, by default, the Limit clause is enabled. So trying GRANT with limit will throw the error. Uncheck the Limit to execute the GRANT successfully.

Default:

imageUncheck Limit to fix this.

image 

View solution in original post

1 REPLY 1

Prabakar
Esteemed Contributor III
Esteemed Contributor III

In Databricks SQL, by default, the Limit clause is enabled. So trying GRANT with limit will throw the error. Uncheck the Limit to execute the GRANT successfully.

Default:

imageUncheck Limit to fix this.

image