Accessing a Remote Database on Linux and UNIX
In this example, the TimesTen Client application system is client.example.com
. The client application is accessing the Server DSN database1
on the remote server system, server.example.com
. The logical server name is LogicalServer
. The instance name of the TimesTen installation is instance
.
-
On the server system
server.example.com
, use thettStatus
utility to verify that the TimesTen server is running and to verify the port number on which it is listening. -
Verify that the server DSN
database1
exists in the systemsys.odbc.ini
file onserver.example.com
.There should be an entry in the
sys.odbc.ini
file as follows. Note that/disk1/timesten
is thetimesten_home
.[database1] DataStore=/disk1/timesten/server/database1
-
Create a logical server name entry for the remote TimesTen server in the
ttconnect.ini
file onclient.example.com
.[LogicalServer] Network_Address=server.example.com TCP_Port=6625
-
On the client system,
client.example.com
, create a client DSN corresponding to the remote server DSN,database1
.There should be an entry in the
odbc.ini
file as follows:[database1CS] TTC_Server=LogicalServer TTC_Server_DSN=database1
-
Run the client application from the system
client.example.com
using the client DSN,database1CS
. The example below uses thettIsql
program that is installed with TimesTen client.ttIsqlCS -connStr "DSN=database1CS"
The next example describes how to access a TimesTen server that is listening on a port numbered other than the default port number.
Let us consider the network address of the TimesTen server is
server.example.com
and the server is listening on Port
6625
. The following methods can
be used to connect to a server DSN: