Using SET QUERY_BAND Requests to Make Proxy User Connections
To make a proxy user connection, a middle tier application that is connected as a trusted user issues a SET QUERY_BAND request that specifies the proxy user name and an optional proxy role for that user. The reserved query band names PROXYUSER and PROXYROLE are used to specify a trusted session user name and proxy role name in the SET QUERY_BAND request, respectively.
With respect to making proxy user connections, a SET QUERY_BAND request performs the following actions.
1 If the query band specifies PROXYUSER, Teradata Database validates that the current user has privileges to connect as the specified proxy user.
2 If the query band specifies PROXYROLE, Teradata Database validates that the role can be set for the specified proxy user.
3 If the validation passes, Teradata Database sets the session to the specified proxy user name and proxy role name.
Once the proxy connection is made, Teradata Database uses the proxy user and the proxy role to determine the privileges for all subsequent requests in the session.
Note the following.
A SET QUERY_BAND request returns an error whenever any of the following violations occur.