Creating a DSN on Linux and UNIX for TimesTen Classic
You can create a DSN in TimesTen Classic in an odbc.ini file for Linux or UNIX platforms.
This section includes the following topics for creating a DSN for TimesTen Classic. In TimesTen Scaleout, you would create the DSN within the appropriate database definitions and connectables. See Managing a Database in the Oracle TimesTen In-Memory Database Scaleout User's Guide for details.
Note:
For examples on defining a DSN, see DSN Examples for TimesTen Classic.
Create a User or System odbc.ini File
User and system DSNs are defined in one of several
odbc.ini
file types.
On Linux and UNIX, user DSNs are defined in the file $HOME/.odbc.ini
or in a file named by the ODBCINI
environment variable. This file is referred to as the user odbc.ini
file. System DSNs are defined in the system odbc.ini
file, which is located in timesten_home
/conf/sys.odbc.ini
.
The syntax for user and system odbc.ini
files are the same. The
syntax is described in odbc.ini File Entry Descriptions. The system odbc.ini
file is created when TimesTen is installed on the system. Users must create their
own user odbc.ini
file.
Perform the following to create the DSN:
Using Environment Variables in Database Path Names
You can use environment variables in the specification of the database path name and transaction log file path name.
For example, you can specify $HOME/AdminDS
for the location
of the database.
Environment variables can be expressed either as $varname
or $(varname)
. The parentheses are optional. A backslash character (\) in the database path name quotes the next character.
Note:
Environment variable expansion uses the environment of the process connecting to the database. Different processes may have different values for the same environment variables and may therefore expand the database path name differently. Environment variables can only be used in the user odbc.ini
file. They cannot be specified in the system sys.odbc.ini
file.