Categories:
User & Security DDL (Roles)

USE ROLE

Specifies the active/current role for the session. The currently-active role sets the context that determines whether the current user has the necessary privileges to access an object or perform an action.

For more information, see Access Control in Snowflake.

Syntax

USE ROLE <name>

Parameters

name
Specifies the identifier for the role to use for the session. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

Usage Notes

  • To use a role, the role must have been granted to the user.
  • Only a single role can be active at a time for a user session.