ROUTINE_PRIVILEGES

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 11.1 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.

Definition

The ROUTINE_PRIVILEGES relation contains the following columns:

Name

Data type

Nullable

Standard

Description

GRANTOR

STRING

No

Yes

Principal who granted the privilege.

GRANTEE

STRING

No

Yes

Principal to which the privilege is granted.

SPECIFIC_CATALOG

STRING

No

Yes

Catalog of routine on which the privilege is granted.

SPECIFIC_SCHEMA

STRING

No

Yes

Database of routine on which the privilege is granted.

SPECIFIC_NAME

STRING

No

Yes

Schema unique (specific) name of routine on which the privilege is granted.

ROUTINE_CATALOG

STRING

No

Yes

Matches SPECIFIC_CATALOG.

ROUTNE_SCHEMA

STRING

No

Yes

Matches SPECIFIC_SCHEMA.

ROUTINE_NAME

STRING

No

Yes

Name of routine on which the privilege is granted.

PRIVILEGE_TYPE

STRING

No

Yes

Privilege being granted.

IS_GRANTABLE

STRING

No

Yes

Always NO. Reserved for future use.

INHERITED_FROM

STRING

Yes

No

The ancestor relation that the privilege is inherited from.

Constraints

The following constraints apply to the ROUTINE_PRIVILEGES relation:

Class

Name

Column List

Description

Primary key

ROUTINE_PRIVS_PK

GRANTOR, GRANTEE, SPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAME, PRIVILEGE_TYPE

Unique identifier for the granted privilege.

Foreign key

ROUTINE_PRIVS_ROUTINE_FK

SPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAME

References ROUTINES

Examples

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