No USAGE permission on database

Problem

You are using a cluster running Databricks Runtime 7.3 LTS and above.

You have enabled table access control for your workspace as the admin user, and granted the SELECT privilege to a standard user-group that needs to access the tables.

A user tries to access an object in the database and gets a SecurityException error message.

Error in SQL statement: SecurityException: User does not have permission USAGE on database <databasename>

Cause

A new USAGE privilege was added to the available data access privileges. This privilege is enforced on clusters running Databricks Runtime 7.3 LTS and above.

Solution

Grant the USAGE privilege to the user-group.

  1. Login to the workspace as an admin user.
  2. Open a notebook.
  3. Run the following command:
GRANT USAGE ON DATABASE <databasename> TO <user-group>;

Review the USAGE privilege documentation for more information.