16.20 - Using SET SESSION to Change the Session Security Constraint Value - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-24
dita:mapPath
wkf1512081455740.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
mdr1472255012272

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.