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

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Advanced SQL Engine
Teradata Database
Release Number
September 2020
Content Type
Programming Reference
Publication ID
English (United States)
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.
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.
Disables the current role, whether directory- or database-assigned, for a session.
Null role is to be made current for the session.
All the roles that have been directly and indirectly granted to a user, whether directory- or database-assigned, become current and active.