odbc.ini File Entry Descriptions

The following sections describe the entries in the odbc.ini file.

Note:

In TimesTen Scaleout, use the ttGridAdmin gridClientExport command to create a system or user odbc.ini file to be used by the TimesTen Client instance. See Establishing Client Connections From a TimesTen Client in the Oracle TimesTen In-Memory Database Scaleout User's Guide.

ODBC Data Sources

Each entry in the optional ODBC Data Sources section lists a data source and a description of the driver it uses.

The data source section has the following format:

[ODBC Data Sources]
DSN=driver-description
  • The DSN is required and it identifies the data source to which the driver connects. You choose this name.

  • The driver-description is required. It describes the driver that connects to the data source.

The optional Data Sources section, when present in the system DSN file on the TimesTen Server, is used during the setup of Client DSNs. All system DSNs are made available to the Client DSN setup for the ODBC Data Source Administrator on the client, which displays all available DSNs on the TimesTen Server. The user can always add a new system DSN in the ODBC Data Source Administrator. When adding DSNs to the system DSN file, you should only include those DSNs that can be advertised to clients. All system DSNs are potentially accessible through the client/server configuration, even if they are not advertised.

DSN Specification

Each DSN listed in the ODBC Data Sources section has its own DSN specification.

The DSN specification for Data Manager DSN could have the format shown in Table 1-2.

Table 1-2 Data Source Specification Format

Component Description

[DSN]

The DSN is required. It is the name of the DSN, as specified in the ODBC Data Sources section of your .odbc.ini file.

Driver=driver-path-name

The TimesTen driver that is linked with the data source.

DataStore=data-store-path-prefix

The directory path and prefix of the database to access. This is required.

DatabaseCharacterSet=Database-character-set

The database character set determines the character set in which data is stored. The database character set is required and cannot be altered after the database has been created. See Choosing a Database Character Set.

CacheAdminWallet=1

Designates that when TimesTen registers the cache administration user credentials, the credentials are saved in an internally managed Oracle Wallet rather than in memory. Setting the CacheAdminWallet connection attribute to 1 is recommended when using cache, but optional. See CacheAdminWallet in Oracle TimesTen In-Memory Database Reference

Optional attributes

See Connection Attributes in Oracle TimesTen In-Memory Database Reference.

For example, the database1 DSN could have a specification that includes the following. Note that /disk1/timesten is the timesten_home.

[database1]
Driver=/disk1/timesten/lib/libtten.so
DataStore=/disk1/timesten/sample_db/DemoDataStore/database1
CacheAdminWallet=1

The database specification for TimesTen client DSN could have the format shown in Table 1-3.

Note:

While the syntax for the TimesTen client DSN is listed here, full directions for setting the client DSN and server DSN are located in Defining Server DSNs for TimesTen Server on a Linux or UNIX System and Defining Client DSNs on a TimesTen Client System.

Table 1-3 Database Specification for TimesTen Client Configurations

Component Description

[DSN]

The DSN is required. It is the same DSN specified in the ODBC Data Sources section of the .odbc.ini file.

TTC_Server=server-name

The server-name is required. It is the DNS name, host name, IP address or logical server name for the TimesTen server.

TTC_Server_DSN=server-DSN

The server-DSN is required. It is the name of the data source to access on the TimesTen server.

TTC_Timeout=value

Client connection timeout value in seconds.

Note:

Most TimesTen driver attributes are ignored for TimesTen client DSNs.

For example, the client/server data source database1CS that connects to database1 on the TimesTen server ttserver could have a data source specification that includes the following:

[database1CS]
TTC_Server=ttserver
TTC_SERVER_DSN=database1
TTC_Timeout=30

odbc.ini File Example

The following example shows portions of a Linux or UNIX .odbc.ini file. Note that /disk1/timesten is the timesten_home.

...
[ODBC Data Sources]
database1=TimesTen 22.1 Driver
...
 
[database1]
Driver=/disk1/timesten/lib/libtten.so
DataStore=/disk1/timesten/sample_db/DemoDataStore/database1
PermSize=128
TempSize=64
DatabaseCharacterSet=AL32UTF8
CacheAdminWallet=1
...
 
########################################################################
# This following sample definitions should be in the .odbc.ini file
# that is used for the TimesTen 22.1 Client.
# The Server Name is set in the TTC_SERVER attribute.
# The Server DSN is set in the TTC_SERVER_DSN attribute.
#########################################################################
 
[ODBC Data Sources]
database1CS=TimesTen 22.1 Client Driver
...
 
[database1CS]
TTC_SERVER=localhost
TTC_SERVER_DSN=database1
...