How to Set Up a DSN on Linux and UNIX Platforms

TimesTen databases are accessed through Data Source Names (DSNs). A DSN is a logical name that identifies a TimesTen database and the set of connection attributes used for connecting to the database. This page shows you how to set up a TimesTen Data Source Name (DSN) on Linux and UNIX platforms.

You can define either a system DSN or a user DSN. On Linux and UNIX systems, system DSNs are defined in the install_dir/info/sys.odbc.ini file. This file is referred to as the system ODBC.INI file.

Setting up a Data Source Name (DSN)

Here is an example on how to set up a system DSN:

  Suppose
  - you want to name your database my_ttdb
  - your TimesTen database points to /disk1/ttdata/database/my_ttdb
  - your transaction logs points to /disk2/ttdata/logs directory
   
a. In your sys.odbc.ini file, add a new data source name in the section labeled [ODBC Data Sources]
   
  my_ttdb=TimesTen 11.2.1 Driver
   
b. For each DSN entry specified, there is a corresponding set of database properties and attributes you need. The database attributes can be added anywhere after the [ODBC Data Sources] section.
  Here is an example of the database attributes you enter for my_ttdb

Note. The DSN name appears inside square brackets at the top of the DSN definition on a line by itself
   
  [my_ttdb]
Driver=/TimesTen/tt1121/lib/libtten.so
DataStore=/disk1/ttdata/database/my_ttdb
LogDir=/disk2/ttdata/logs
PermSize=40
TempSize=32
DatabaseCharacterSet=AL32UTF8
OracleNetServiceName=orcl_db
   
  The relevant attributes values are:

Driver = the TimesTen Direct Linked ODBC Driver
DataStore = the location and the name of the database files
LogDir = the directory for the transaction logs
PermSize = the size of the permanent region of the database. In the above example, this is configured for 40MB
TempSize = the size of the temporary region of the database. In the above example, this is configured for 32MB
DatabaseCharacterSet = the character set used by the database
OracleNetServiceName = the TNS service name to the Oracle database. This attribute is required for In-Memory Database Cache only.

Note: If you are using In-Memory Database Cache to cache Oracle database tables, the database character set must be set to the same value as the Oracle database. To determine the Oracle database character set, execute the following query on the Oracle database:

select value from nls_database_parameters
where parameter='NLS_CHARACTERSET';