Defining DSNs for Direct or Client/Server Connections
DSNs are created to uniquely identify a database, whether local or remote.
The following explains the type of DSN to use for either a direct or client/server connection:
-
Data Manager DSN: A DSN that specifies a local database on a Linux or UNIX host. You can use either the production version or debug version of the TimesTen Data Manager driver.
A Data Manager DSN refers to a database using a path name and a file name prefix. The database path name specifies the directory location of the database and the prefix for the database, such as
/disk1/databases/AdminDS.Note:
This path name and prefix does not define a file name, but the name of the directory where the database is located and the prefix for all database files. The actual files used by the database append file suffixes, such as
/disk1/databases/AdminDS.ds0.A Data Manager DSN that refers to a given TimesTen database must be defined on the same system on which the database resides. If multiple Data Manager DSNs refer to the same database, they must all use exactly the same database path name, even if some other path name identifies the same location. For example, you cannot use a symbolic link to refer to the database in one DSN and the actual path name in another DSN.
-
Client DSN: A client DSN specifies a remote database and uses the TimesTen client. A client DSN refers to a TimesTen database indirectly by specifying a
hostname, DSNpair, where the hostname represents the server system on which TimesTen server is running and the DSN refers to a server DSN that specifies the TimesTen database on the server host. -
Server DSN: A server DSN is always defined as a system DSN and is defined on the server system for each database on that server that can be accessed by client applications. The format and attributes of a server DSN are very similar to those of a Data Manager DSN.
On Linux and UNIX, all user DSNs including both client DSNs and Data Manager DSNs
that are created by a specific user are defined in the same user
odbc.ini file. Similarly, all system DSNs are defined in the same
system odbc.ini file.
The following table indicates the types of DSN supported by TimesTen, whether to create a user or system DSN and the location of the DSN.
| DSN type | User or System DSN? | Location of DSN |
|---|---|---|
|
Data Manager DSN |
Can be a user or system DSN |
Located on the system where the database resides. |
|
Client DSN |
Can be a user or system DSN |
Located on any local or remote system. |
|
Server DSN |
Must be a system DSN |
Located on the system where the database resides. |
See Working with the TimesTen Client and Server for more information about Client DSNs and Server DSNs.