MSCK REPAIR PRIVILEGES
Applies to: Databricks SQL Databricks Runtime
Removes all the privileges from all the users associated with the object.
You use this statement to clean up residual access control left behind after objects have been dropped from the Hive metastore outside of Databricks SQL or Databricks Runtime.
Syntax
MSCK REPAIR object PRIVILEGES
object
{ [ SCHEMA | DATABASE ] schema_name |
FUNCTION function_name |
TABLE table_name
VIEW view_name |
ANONYMOUS FUNCTION |
ANY FILE }
Parameters
-
Names the schema from which privileges are removed.
-
Names the function from which privileges are removed.
-
Names the table from which privileges are removed.
-
Names the view from which privileges are removed.
ANY FILE
Revokes
ANY FILE
privilege from all users.ANONYMOUS FUNCTION
Revokes
ANONYMOUS FUNCTION
privilege from all users.
Examples
> MSCK REPAIR SCHEMA gone_from_hive PRIVILEGES;
> MSCK REPAIR ANONYMOUS FUNCTION PRIVILEGES;
> MSCK REPAIR TABLE default.dropped PRIVILEGES;