Oracle® TimesTen In-Memory Database Reference Release 11.2.1 Part Number E13069-03 |
|
|
View PDF |
TimesTen Client connection attributes are used only when you are connecting to a TimesTen server from a TimesTen client application. TimesTen Client connection attributes are listed in Table 1-8, "Client connection attributes" and described in detail in this section.
In addition to the attributes listed in this section, some data store attributes and general connection attributes are also available for client connections or impact the behavior of the connection. These attributes are:
When connecting to a TimesTen data store using the TimesTen Client and Server, the TimesTen Client requires the network address and the TCP port number of the machine running the TimesTen Server. As a convenience, TimesTen allows you to define a logical server name that contains the network address and port number pair.
If you specify anything other than a logical server name for the TTC_Server attribute in the Client DSN definition, TimesTen Client assumes that the Server is running on the default TCP/IP port number. In such cases, if your Server is running on a port other than the default port, you must specify the port number in the ODBC connection string. For example:
"TTC_SERVER=server_host_name;TTC_SERVER_DNS=Server_DSN;TCP_PORT=server_port"
or
"DSN=Client_DSN;TCP_Port=server_port"
Required privilege
No privilege is required to change the value of this attribute.
Setting
Set TCP_Port as follows:
Where to set the attribute | How the attribute is represented | Setting |
---|---|---|
C or Java programs | TCP_Port | Specify the port number where the Server is listening. |
Windows ODBC Data Source Administrator and UNIX ODBC.INI file | TimesTen does not support specifying this attribute directly in a UNIX ODBC.INI file or in the Windows ODBC Data Source Administrator. Alternatively, TCP_Port can be defined in the logical server name. | N/A |
This attribute is used to specify the port number to use in the case of an automatic failover. See the description of TCP_Port for details on setting the value of this attribute and associated attributes.
See Oracle TimesTen In-Memory Database Operations Guide for more information on automatic client failover.
Required privilege
No privilege is required to change the value of this attribute.
Setting
Set TCP_Port2 as follows:
Where to set the attribute | How the attribute is represented | Setting |
---|---|---|
C or Java programs | TCP_Port2 | Specify the failover port number where the Server should listen. |
Windows ODBC Data Source Administrator and UNIX ODBC.INI file | TimesTen does not support specifying this attribute directly in a UNIX ODBC.INI file or in the Windows ODBC Data Source Administrator. Alternatively, TCP_Port can be defined in the logical server name. | N/A |
Specifies a port range for the port that the automatic client failover thread will listen on for failover notifications in an active/standby replication configuration. The failover configuration allows a client application to connect to a new active node automatically in the case of a failure on the current node.
Specifying a port range helps accommodate firewalls between the client and server systems. By default, TimesTen uses a port chosen by the operating system.
Note:
Client failover is only supported when the client is part of an active/standby pair replication configurations.See Oracle TimesTen In-Memory Database Operations Guide for more information on automatic client failover.
Required privilege
No privilege is required to change the value of this attribute.
Setting
Set TTC_FailoverPortRange as follows:
Where to set the attribute | How the attribute is represented | Setting |
---|---|---|
C or Java programs or UNIX ODBC.INI file | TTC_FailoverPortRange | Specify a lower value and an upper value for the port numbers in the format <lowervalue>-<upper value>. |
Windows ODBC Data Source Administrator | Failover Port Range field | Specify a lower value and an upper value for the port numbers in the format <lowervalue>-<upper value>. |
When connecting to a TimesTen data store using the TimesTen Client and Server, the TimesTen Client requires the specification of the network address and TCP port number of the machine running the TimesTen Server. As a convenience, TimesTen allows you to define a logical server name that contains the network address and port number pair. If you specify anything other than a logical server name for this attribute, TimesTen Client assumes that the Server is running on the default TCP/IP port number. In such cases, if your Server is running on a port other than the default port, you must specify the port number in the ODBC connection string. For example:
"TTC_SERVER=server_host_name;TTC_SERVER_DNS=Server_DSN;TCP_PORT=server_port"
or
"DSN=Client_DSN;TCP_Port=server_port"
Once the logical server name is defined, it can be used as the value for the TTC_Server attribute in a Client DSN. Therefore, multiple Client DSNs referencing the same machine that is running the TimesTen Server can use the same logical server name for the value of the TTC_Server attribute instead of having to specify repeatedly the same network address and port number within each of the Client DSNs.
Note:
TimesTen recommends that you specify a logical server name for the TTC_Server attribute. However, you can also specify a domain name server (DNS), host name or IP address for the TTC_Server attribute. If you do not use a logical server name and the TimesTen Server is listening on a non-default port number, you must provide the port number in the ODBC connection string. For example:"TTC_SERVER=server_host_name;TTC_SERVER_DNS=Server_DSN;TCP_PORT=server_port"
or
"DSN=Client_DSN;TCP_Port=server_port"
Required privilege
No privilege is required to change the value of this attribute.
Setting
Set TTC_Server as follows:
Where to set the attribute | How the attribute is represented | Setting |
---|---|---|
C or Java programs or UNIX ODBC.INI file | TTC_Server | Character string specifying the logical server. |
Windows ODBC Data Source Administrator | Server Name or Network Address field | Character string specifying the logical server. |
This attribute is used to specify the logical server name to use in the case of an automatic failover. See the description of TTC_Server for details on setting the value of this attribute and associated attributes.
The value of this attribute can be can be the same as the value specified for TTC_Server if it is a virtual IP address.
If the client has already failed over and has connected to TTC_Server2 and the connection fails, it will connect to TTC_Server. It alternately attempts to connect to TTC_Server and TTC_Server2 until the TTC_TIMEOUT attribute expires.
Note:
Client failover is only supported when the client is part of an active/standby pair replication configurations.See Oracle TimesTen In-Memory Database Operations Guide for more information on automatic client failover.
Required privilege
No privilege is required to change the value of this attribute.
Setting
Set TTC_Server2 as follows:
Where to set the attribute | How the attribute is represented | Setting |
---|---|---|
C or Java programs or UNIX ODBC.INI file | TTC_Server2 | Character string specifying the logical server to be used in the case of an automatic failover. |
Windows ODBC Data Source Administrator | Server Name or Network Address 2 field | Character string specifying the logical server to be used in the case of an automatic failover. |
The TTC_Server_DSN attribute specifies a Server DSN on the machine running the TimesTen Server.
On Windows, Server DSNs are the set of TimesTen System DSNs that use the TimesTen Data Manager driver. Use the ODBC Data Source Administrator to define Server DSNs.
On UNIX, Server DSNs are defined in the /var/TimesTen/
instance
/sys.odbc.ini
file. More details on this topic can be found in the platform-specific sections.
Required privilege
No privilege is required to change the value of this attribute.
Setting
Set TTC_Server_DSN as follows:
Where to set the attribute | How the attribute is represented | Setting |
---|---|---|
C or Java programs or UNIX ODBC.INI file | TTC_Server_DSN | Character string specifying the DSN that resides on the Server machine. |
Windows ODBC Data Source Administrator | Server DSN field | Character string specifying the DSN that resides on the Server machine. |
This attribute is used to specify the Server DSN on the machine running the TimesTen Server. This is the Server DSN to be used in the case of an automatic failover. See the description of TTC_Server_DSN for details on setting the value of this attribute and associated attributes.
In the case of a failover, if the client cannot connect to TTC_Server_DSN or loses the connection to the DSN, it will attempt to connect to TTC_Server_DSN2.
Note:
Client failover is only supported when the client is part of an active/standby pair replication configurations.See Oracle TimesTen In-Memory Database Operations Guide for more information on automatic client failover.
Required privilege
No privilege is required to change the value of this attribute.
Setting
Set TTC_Server_DSN2 as follows:
Where to set the attribute | How the attribute is represented | Setting |
---|---|---|
C or Java programs or UNIX ODBC.INI file | TTC_Server_DSN2 | Character string specifying the DSN that resides on the Server machine to be used in the case of an automatic failover. |
Windows ODBC Data Source Administrator | Server DSN2 field | Character string specifying the DSN that resides on the Server machine to be used in the case of an automatic failover. |
The TTC_Timeout attribute sets a maximum time limit, in seconds, for an operation (e.g., a connection, SQL query) that is completed by using the TimesTen Client and Server. The TTC_Timeout attribute also determines the maximum number of seconds a TimesTen Client application waits for the result from the corresponding TimesTen Server process before timing out.
A value of 0 indicates that client/server operations should not timeout. Setting of this attribute is optional. If this attribute is not set, the default timeout period is 60 seconds. The maximum timeout period is 99,999 seconds. Upon timeout, the operation is interrupted, the Client application receives a timeout error and the connection is terminated. For example, if the Client application is running long queries, you may want to increase the timeout interval.
For certain queries, the client application may also set the SQL_QUERY_TIMEOUT ODBC statement option. The TimesTen Client ODBC Driver requires that SQL_QUERY_TIMEOUT must be less than TTC_TIMEOUT, unless the network timeout is set to 0. In that case, the network operation does not timeout.
The query timeout can be set using the SQLSetConnectOption
ODBC call before a connection is established to the data store using either the SQLConnect
or SQLDriverConnect
ODBC calls. Alternatively, the query timeout can be set by calling either the SQLSetConnectOption
or SQLSetStmtOption
ODBC calls after a connection is established to the data store.
When the query timeout is set before establishing a connection to the data store, the client driver does not know the network timeout value at that point. Hence, later, at connect time, the client driver silently sets the query timeout to a value slightly smaller than the network timeout value if:
The network timeout value is greater than 0; and
The query timeout value was 0, or greater than or equal to the network timeout value.
When the query timeout is set after establishing a connection to the data store, the client driver returns an error if the network timeout value is greater than 0, and the query timeout value greater than or equal to the network timeout value. The SQLState
is set to S1000.
This attribute is not supported when shared memory is used for Client/Server inter-process communication. If set, TimesTen ignores the attribute.
Required privilege
No privilege is required to change the value of this attribute.
Setting
Set TTC_Timeout as follows:
Where to set the attribute | How the attribute is represented | Setting |
---|---|---|
C or Java programs or UNIX ODBC.INI file | TTC_Timeout | A value between 0 and 99999 that represents the number of seconds that TimesTen Client waits for a connection before timing out. (The default value is 60.) |
Windows ODBC Data Source Administrator | Timeout Interval field | A value between 0 and 99999 that represents the number of seconds that TimesTen Client waits for a connection before timing out. (The default value is 60.) |