SET ROLE Examples | Teradata Vantage - SET ROLE Examples - Analytics Database - Teradata Vantage

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

Example: Changing Current Role

This request changes the current role for a session to administration.

SET ROLE administration;

Example: Enabling All Roles

This request specifies that all roles and their nested database roles that have been granted to the user become current and active for a session.

SET ROLE ALL;

Example: Disabling Current Role SQL Data Control Language

These requests disable the current role for a session.

SET ROLE NONE;
SET ROLE NULL;

Example: Enabling EXTERNAL Role

This request resets the current set of roles for the session to the set of all directory roles assigned (mapped) to the external user making the request.

     SET ROLE EXTERNAL;