17.10 - SET ROLE Syntax Elements - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)
role_name
Name of the role to set as the current role for a session.
You can use the SET ROLE role_name syntax to enable an externally-assigned role plus any of its nested database roles within a session while disabling all other roles.
EXTERNAL
All external roles mapped to the user are to be made active for the session.
The EXTERNAL keyword is useful only for directory users who are mapped to both a user object and one or more external role objects in the directory, where the system defaults to the privileges for the mapped user.
If the directory user is mapped only to external role objects and not mapped to a database user object, all the external roles are active by default.
NONE
Disables the current role, whether directory- or database-assigned, for a session.
NULL
Null role is to be made current for the session.
ALL
All the roles that have been directly and indirectly granted to a user, whether directory- or database-assigned, become current and active.