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 section 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 also referred to as the system ODBC.INI file.

The following section goes through an example of how to set up a system DSN. Suppose that you want to:

You would do the following:

  1. In your sys.odbc.ini file, add a new data source name in the section labeled [ODBC Data Sources]:

    my_ttdb=TimesTen 11.2.2 Driver


  2. For each DSN entry specified, there is a corresponding set of database properties and attributes you need to specify. 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/tt1122/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 TimesTen Cache only.

    Note: If you are using TimesTen 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';