Is it possible to do connection pooling and recognize the user at the same time?

Connectivity

Is it possible to do connection pooling and recognize the user at the same time?

We want to use connection pooling in Teradata JDBC, but also to set the user context for each SQL statement to reflect the individual user on behalf of whom the application is making the individual request, in a way that can be recognized by our database views so they can use the individual userid to enforce row-level security. Is this possible in Teradata? If so, how do we accomplish it?

I searched the Archives and read the JDBC user manual. Unfortuantely I didn't see an answer in either of those sources. I'd appreciate any help you can offer.

Thanks

Allan Pomeroy
1 REPLY
Teradata Employee

Re: Is it possible to do connection pooling and recognize the user at the same time?

Teradata Database 13.0 and later offer a "PROXYUSER" feature that is specified via the SET QUERY_BAND command. It can permit a pooled connection to temporarily impersonate a different database user.

Teradata Database 13.10 and later offer a feature called "Trusted Sessions Enhanced Security" to limit only "Trusted SQL" to use SET QUERY_BAND to set or remove the current proxy user.

http://developer.teradata.com/doc/connectivity/jdbc/reference/current/jdbcug_chapter_2.html#BGBEFIH3

Finally, Teradata Database 14.0 offers row-level security.

So the answer to your question is Yes, this is possible with Teradata Database 14.0. You can use the PROXYUSER feature in conjunction with row-level security.