TTC_REDIRECT

For TimesTen Scaleout, TTC_REDIRECT defines how a client is redirected. If this is set to 0 and the initial connection attempt to the desired data instance fails, then an error is returned and there are no further connection attempts. This does not affect subsequent failovers on that connection.

Automatic redirection: By default, this connection attribute is set to 1 so that a client connection is automatically redirected to any available data instance within the grid if the current host is busy or unavailable. The connection is redirected to the host with the fewest number of client connections.

Elements within a single replica set: If you want the client to connect to elements within a single replica set (because the data you are interested in is contained within this replica set), then set the TTC_REDIRECT connection attribute to 0. Then, the client connects only to the host indicated by the DSN or to the host with the element in the same replica set. If the connection is rejected, then a connection error is returned.

The TTC_Redirect_Limit attribute limits how many times the client is redirected. The number of hosts in your grid can be of a size that you want to limit the number of redirected client connection attempts for performance reasons. You can set the TTC_Redirect_Limit connection attribute to the number of connection redirection attempts. For example, setting TTC_Redirect_Limit=10 limits the number of client connection redirection attempts to other hosts to 10 attempts. If the client does not connect within this number of attempts, a connection error is returned.

Required Privilege

No privilege is required to change the value of this attribute.

Usage in TimesTen Scaleout and TimesTen Classic

This attribute is supported in both TimesTen Classic and TimesTen Scaleout.

Setting

Set TTC_REDIRECT as follows:

Where to set the attribute How the attribute is represented Setting

C or Java programs or UNIX and Linux systems odbc.ini file in TimesTen Classic or in the database definition (.dbdef) file in TimesTen Scaleout

TTC_REDIRECT

1 (default) - redirect to any available data instance

0 - error if redirection to specified data instance fails

Windows ODBC Data Source Administrator

Not applicable