To configure a client-server connection to the data store.
使用fxrep Datastore举例:Step 1: Server端的机器上配置DSN,指向Server端的Datastore.
在/export/home/times/TimesTen/tt70/info/sys.odbc.ini文件中添加fxrep DSN的配置,如下
################################################################
# New data source definitions can be added below.
################################################################
[fxrep]
Driver=/export/home/times/TimesTen/tt70/lib/libtten.so
DataStore=/export/home/times/TimesTen/datastore/fxrep
DatabaseCharacterSet=US7ASCII
PermSize=20
Overwrite=0
Authenticate=0
测试Server 端配置是否成功:
bjinms221.bj.com> ttisql fxrep
Copyright (c) 1996-2007, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.
connect "DSN=fxrep";
Connection successful: DSN=fxrep;UID=times;DataStore=/export/home/times/TimesTen/datastore/fxrep;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;DRIVER=/export/home/times/TimesTen/tt70/lib/libtten.so;Authenticate=0;PermSize=20;TypeMode=0;
(Default setting AutoCommit=1)
Command>
Step 2: 在Client端机器上配置DSN,指向Server端的DSN
在/ora/TimesTen/tt70/info/sys.odbc.ini文件中添加fxrep_18 DSN的配置,如下
[fxrep_18]
TTC_SERVER=fxrep_18
TTC_SERVER_DSN=fxrep
Step 3: 在Client端机器上配置Timetens连接串
在/ora/TimesTen/tt70/info/sys.ttconnect.ini文件中添加fxrep_18连接串的配置信息
[fxrep_18]
Description=TimesTen Server
Network_Address=bjinms221 (在/etc/hosts文件中配置相应的主机名和IP地址)
TCP_PORT=17003
测试Client端配置是否成功:
$ ttisqlcs fxrep_18
Copyright (c) 1996-2007, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.
connect "DSN=fxrep_18";
Connection successful: DSN=fxrep_18;TTC_SERVER=fxrep_18;TTC_SERVER_DSN=fxrep;UID=times;DATASTORE=/export/home/times/TimesTen/datastore/fxrep;DATABASECHARACTERSET=US7ASCII;CONNECTIONCHARACTERSET=US7ASCII;AUTHENTICATE=0;PERMSIZE=20;TYPEMODE=0;
(Default setting AutoCommit=1)
Command>
Windows平台
运行 ODBC Administrator -> System DSN -> Add -> TimesTen CLient 7.0 -> Finish
在窗口里填写如下信息 Client Dsn: fxrep_18 Server name or network address: bjinms221 单击 SERVERS 按钮, 添加logical server 'bjinms221' on port '17302' Sever DSN: fxrep 然后,OK保存 在命令行窗口测试连接ttIsql fxrep_18