Skip to main content

ROUTINE_PRIVILEGES

Preview

This feature is in Public Preview.

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 11.3 LTS and above check marked yes Unity Catalog only

INFORMATION_SCHEMA.ROUTINE_PRIVILEGES lists principals that have privileges on a routine in a catalog.

The rows returned are limited to the routines the user is privileged to interact with.

note

Currently, users with the MANAGE privilege on an object cannot view all grants for that object in the INFORMATION_SCHEMA. Instead, the INFORMATION_SCHEMA only shows grants their own grants on the object. This behavior will be corrected in the future.

Users with MANAGE privilege can view all grants on an object using SQL commands or Catalog Explorer. See Manage privileges in Unity Catalog.

Definition

The ROUTINE_PRIVILEGES relation contains the following columns:

NameData typeNullableStandardDescription
GRANTORSTRINGNoYesPrincipal who granted the privilege.
GRANTEESTRINGNoYesPrincipal to which the privilege is granted.
SPECIFIC_CATALOGSTRINGNoYesCatalog of routine on which the privilege is granted.
SPECIFIC_SCHEMASTRINGNoYesDatabase of routine on which the privilege is granted.
SPECIFIC_NAMESTRINGNoYesSchema unique (specific) name of routine on which the privilege is granted.
ROUTINE_CATALOGSTRINGNoYesMatches SPECIFIC_CATALOG.
ROUTNE_SCHEMASTRINGNoYesMatches SPECIFIC_SCHEMA.
ROUTINE_NAMESTRINGNoYesName of routine on which the privilege is granted.
PRIVILEGE_TYPESTRINGNoYesPrivilege being granted.
IS_GRANTABLESTRINGNoYesAlways NO. Reserved for future use.
INHERITED_FROMSTRINGYesNoThe ancestor relation that the privilege is inherited from.

Constraints

The following constraints apply to the ROUTINE_PRIVILEGES relation:

ClassNameColumn ListDescription
Primary keyROUTINE_PRIVS_PKGRANTOR, GRANTEE, SPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAME, PRIVILEGE_TYPEUnique identifier for the granted privilege.
Foreign keyROUTINE_PRIVS_ROUTINE_FKSPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAMEReferences ROUTINES

Examples

SQL
> SELECT specific_catalog, specific_schema, specific_name, grantee
FROM information_schema.routine_privileges;