Permission denied error when trying to run VACUUM command on Unity Catalog table with dedicated compute (formerly single-user cluster)

Use shared compute instead, or ensure proper access permissions to both the source and cloned tables.

Written by guruprasad.bn

Last published at: March 13th, 2025

Problem

When using dedicated compute (formerly single-user cluster) to run the command VACUUM <catalog-name>.<schema-name>.<table-name> on a table in Unity Catalog, your query fails with the following error. 

 

\ERROR SQLDriverLocal: Error in SQL query: VACUUM `catalog-name`.`schema-name`.`table-name`
com.databricks.sql.managedcatalog.acl.UnauthorizedAccessException: PERMISSION_DENIED: Catalog 'catalog-name' is not accessible in current workspace

 

Cause

The table has been created using a shallow clone of an existing source table in the workspace. You may not have the required permissions on the cloned table, and the cloned table may not be available in your workspace.

Shallow clones reference the same underlying data files as the source table, rather than creating a separate copy. When running VACUUM on the source table, Databricks validates all references, including cloned tables. Dedicated compute requires explicit access to both the source and cloned tables due to stricter security enforcement.

 

Solution

Databricks recommends using shared compute (formerly shared clusters). Shared compute enforces permissions at runtime, avoiding additional access checks on cloned tables.

If you continue to use dedicated compute, ensure you have the required read/write permissions and the cloned table is accessible. Use the following commands to grant access. 

 

GRANT USE_CATALOG `<catalog-name>` TO `<user-or-group>`;
GRANT USE_SCHEMA `<catalog-name>`.`<schema-name>` TO `<user-or-group>`;
GRANT SELECT, MODIFY ON TABLE `<catalog-name>`.`<schema-name>`.`<table-name>` TO `<user-or-group>`;

 

If the catalog resides in a different workspace, ensure that workspace-catalog binding is disabled. For more details, refer to the Limit catalog access to specific workspaces (AWSAzureGCP) documentation.