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 thettStatusutility to verify that the TimesTen server is running and to verify the port number on which it is listening. -
Verify that the server DSN
database1exists in the systemsys.odbc.inifile onserver.example.com.There should be an entry in the
sys.odbc.inifile as follows. Note that/disk1/timestenis thetimesten_home.[database1] DataStore=/disk1/timesten/server/database1
-
Create a logical server name entry for the remote TimesTen server in the
ttconnect.inifile 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.inifile as follows:[database1CS] TTC_Server=LogicalServer TTC_Server_DSN=database1
-
Run the client application from the system
client.example.comusing the client DSN,database1CS. The example below uses thettIsqlprogram 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: