Using SET SESSION to Change the Session Security Constraint Value - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

Users assigned more than one value for a security constraint can use SET SESSION CONSTRAINT to replace the default value with another assigned value, for example:

SET SESSION 
CONSTRAINT = constraint_name
 {(value_name
 ... [,value_name
]|(NULL)} ... [,CONSTRAINT = constraint_name
 {(value_name ... [,value_name])|(NULL)}
CONSTRAINT = constraint_name
A security constraint for which the user wants to reset the session default value, which must be:
  • An existing CONSTRAINT object
  • Currently assigned to the user
A SET SESSION statement can specify maximum of 6 non-set and 2 set constraints.
value_name
One or more value names that are valid for the specified constraint name and executing user.
The value_name specification(s) replace the current session constraint value.
If values for a constraint are already assigned to a session and the constraint is not named in the SET SESSION request, the values for that constraint remain unchanged.
Value_name specifications are subject to the following limitations:
  • For non-hierarchical (set) constraints, you can specify as many of the values assigned to the user (in the profile or user definition) as you need. The system uses the specified value(s) as the session value(s).
  • For hierarchical (non-set) constraints, you can only specify one alternate value from either the profile or user definition.
[,value_name ]|(NULL)
If the constraint name is followed by the NULL option, the constraint is removed from the session label.