TimesTen1122配置客户端连接

1、配置TNS

在使用TT客户端之前需要安装oracle客户端,配置好连接oracle数据库的TNS

FYL_TT =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.6.99)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = fyl)
    )
  )
测试
[oracle@db1 admin]$ sqlplus scott@fyl_tt/tiger

2、安装TT客户端软件

[oracle@db1 linux8664]$ ./setup.sh 

ERROR: The /etc/TimesTen directory needs to be created for the instance registry
       and its ownership and permissions set appropriately.
       Please refer to the installation guide for assistance.

[oracle@db1 linux8664]$ 
[oracle@db1 linux8664]$ 
[oracle@db1 linux8664]$ ./setup.sh 

NOTE: Each TimesTen installation is identified by a unique instance name.
      The instance name must be a non-null alphanumeric string, not longer
      than 255 characters.

Please choose an instance name for this installation? [ tt1122 ] 
Instance name will be 'tt1122'.
Is this correct? [ yes ] 

Of the three components:

  [1] Client/Server and Data Manager
  [2] Data Manager Only
  [3] Client Only

Which would you like to install? [ 1 ] 3

Of the following options :

  [1] /home/oracle
  [2] /soft
  [3] Specify a location
  [q] Quit the installation

Where would you like to install the tt1122 instance of TimesTen? [ 1 ] 3
Please specify a directory to install TimesTen? [ /home/oracle ] /u02
Installing into /u02/TimesTen/tt1122 ...
Creating /u02/TimesTen/tt1122 ...
Uncompressing ...

NOTE: For security, we recommend that you restrict access to the
      TimesTen installation to members of a single OS group. Only members of
      that OS group will be allowed to perform direct mode connections to
      TimesTen, and only members of that OS group will be allowed to perform
      operations that access TimesTen data stores, TimesTen files and shared
      memory. The OS group defaults to the primary group of the instance
      administrator. You can default to this group, choose another OS group
      or you can make this instance world-accessible. If you choose to make
      this instance world-accessible, all database files and shared memory
      are readable and writable by all users.

Restrict access to the the TimesTen installation to the group 'oinstall'? [ yes ] 
      TNS_ADMIN was not set in your environment but there is a tnsnames.ora
      file in /u01/app/oracle/product/11.2.0/db_1/network/admin.
Would you like to use this TNS_ADMIN setting for the Oracle TimesTen Application-Tier Database Cache? [ yes 

] 

TNS_ADMIN will be set to /u01/app/oracle/product/11.2.0/db_1/network/admin
You can change TNS_ADMIN later by running <install_dir>/bin/ttmodinstall.



NOTE: It appears that you are running version 4 or higher of the g++
      compiler. TimesTen ships with multiple sets of client libraries and server
      binaries : one built for compatibility with g++ 3.4.6 and one with
      g++ 4.1.0. The installer has created links to the 4.1.0 library in the
      <install_dir>/lib directory and to the 4.1.0 server binary in the
      <install_dir>/bin directory. If you want to use a different compiler,
      please modify the links to point to the desired library and server binary.

Do you want to install the Quick Start Sample Programs and the TimesTen Documentation? [ no ] 
Would you like to install the documentation (without the Quick Start Sample Programs)? [ yes ] 
Where would you like to create the doc directory? [ /u02/TimesTen/tt1122/doc ] 
The TimesTen documentation has been installed in /u02/TimesTen/tt1122/doc.
Installing client components ...
What is the name of the host running the TimesTen server? [ db1 ] 
What is the TCP/IP port number that the TimesTen server is listening on? [ 53397 ] 
The 11.2.2.8 Release Notes are located here :
  '/u02/TimesTen/tt1122/README.html'

End of TimesTen installation.
3、配置客户端数据源

查看服务器端服务端口
[oracle@fyl admin]$ ttstatus|grep "TimesTen server"
TimesTen server pid 2401 started on port 53397
配置客户端数据源
[oracle@db1 info]$ vi sys.ttconnect.ini 

[mydb_test]
Description=TimesTen Server
Network_Address=192.168.6.99
TCP_PORT=53397

[oracle@db1 info]$ vi sys.odbc.ini 

[ODBC Data Sources]
mydb_CS=TimesTen 11.2.2 Client Driver

[mydb_CS]
TTC_SERVER=mydb_test
TTC_SERVER_DSN=mydb
UID=scott
4、测试

[oracle@db1 bin]$ ./ttisqlcs mydb_CS

Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.



connect "DSN=mydb_CS";
Enter password for 'scott': 
Connection successful: 

DSN=mydb_CS;TTC_SERVER=mydb_test;TTC_SERVER_DSN=mydb;UID=scott;DATASTORE=/u02/TimesTen/oradata/mydb;DATABAS

ECHARACTERSET=ZHS16GBK;CONNECTIONCHARACTERSET=US7ASCII;PERMSIZE=60;TEMPSIZE=40;TYPEMODE=0;ORACLENETSERVICEN

AME=fyl;
(Default setting AutoCommit=1)
Command> tables;
  SCOTT.DEPT
1 table found.
Command> select * from dept;
< 10, ACCOUNTING, NEW YORK >
< 20, RESEARCH, DALLAS >
< 30, SALES, CHICAGO >
< 40, OPERATIONS, BOSTON >
4 rows found.




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值