Using SET SESSION to Change the Session Security Constraint Value - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

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
  • 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 running user.
The value_name specifications 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.
For non-hierarchical (set) constraints, specify the values you need. The system uses the specified values as the session values.
For hierarchical (non-set) constraints, specify only 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.