SET ROLE Syntax Elements - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™
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.