Step by Step TimesTen ----- 配置client-server連線

feng_xin發表於2008-08-07

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

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/81/viewspace-421428/,如需轉載,請註明出處,否則將追究法律責任。

相關文章