15.10 - Using SET SESSION to Change the Session Security Constraint Value - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Teradata Database
December 2015
Programming Reference

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:

CONSTRAINT = constraint_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.
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.