ttCacheUidPwdSet 报 5102错误的原因和解决方法

在建立cache group的时候,有时候会发现如下错误:
[tt70s@com ~]$ ttisql "DSN=ttcache;UID=oratt;PWD=timesten;OraclePWD=oracle"
Copyright (c) 1996-2008, Oracle.  All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.

connect "DSN=ttcache;UID=oratt;PWD=timesten;OraclePWD=oracle";
Connection successful: DSN=ttcache;UID=oratt;DataStore=/home/tt70s/TimesTen/ttcache/ckpt/ckpt;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;DRIVER=/home/tt70s/TimesTen/tt70s/lib/libtten.so;OracleId=orcl;Authenticate=0;LogDir=/home/tt70s/TimesTen/ttcache/log;PermSize=32;TempSize=16;TypeMode=0;
(Default setting AutoCommit=1)
Command> call ttCacheUidPwdSet('cacheadm', 'oracle');
5102: Cannot load backend library 'libttor.so' for Cache Connect.  OS error message 'libttor.so: cannot open shared object file: No such file or directory'.
The command failed.
Command>

常见的几种原因:
1,sys.odbc.ini文件配置不对
2,timesten用户的profile文件中缺少oracle 或者timesten的lib设置
3,oracle监听没有启动
4,没有正确安装cache connect to oracle的选件
5,不过,Cache Connect TimesTen v7.0.5 to Oracle DB 11.1g 出现类似问题,需要一个workround,这个会在后续的blog中在说
当然,实际情况可能因人而异(比如安装,操作的失误等等),这里列举的仅仅是常见的问题:
我的sys.odbc.ini配置如下:
==========sys.odbc.ini:===================
[ttcache]
DataStore=/home/tt70s/TimesTen/ttcache/ckpt/ckpt
LogDir=/home/tt70s/TimesTen/ttcache/log
DatabaseCharacterSet=AL32UTF8
PermSize=32
TempSize=16
Authenticate=0
UID=oratt
PWD=oracle
racleId=orcl
raclePwd=oracle
尝试建立cache group:
[tt70s@com ~]$ ttisql "DSN=ttcache;UID=oratt;PWD=timesten;OraclePWD=oracle"
Copyright (c) 1996-2008, Oracle.  All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.

connect "DSN=ttcache;UID=oratt;PWD=timesten;OraclePWD=oracle";
Connection successful: DSN=ttcache;UID=oratt;DataStore=/home/tt70s/TimesTen/ttcache/ckpt/ckpt;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;DRIVER=/home/tt70s/TimesTen/tt70s/lib/libtten.so;OracleId=orcl;Authenticate=0;LogDir=/home/tt70s/TimesTen/ttcache/log;PermSize=32;TempSize=16;TypeMode=0;
(Default setting AutoCommit=1)
Command> call ttCacheUidPwdSet('cacheadm', 'oracle');
5102: Cannot load backend library 'libttor.so' for Cache Connect.  OS error message 'libttor.so: cannot open shared object file: No such file or directory'.
The command failed.
Command>


使用 tnsping orcl发现ping不通:
[oracle@com admin]$ tnsping orcl
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 30-OCT-2008 16:10:05
Copyright (c) 1997, 2005, Oracle.  All rights reserved.
Used parameter files:
/home/oracle/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = com.oracle.linux)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.oracle.com)))

。。。


检查监听,发现没有启动,于是启动监听:
[oracle@com admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 30-OCT-2008 16:11:20
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
。。。
发现不能启动

ping主机不通
[tt70s@com ~]$ ping com.oracle.linux
PING com.oracle.linux (192.168.80.128) 56(84) bytes of data.
--- com.oracle.linux ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3006ms

检查/etc/hosts:
[tt70s@com ~]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.80.128   com.oracle.linux
127.0.0.1               com.oracle.linux com localhost.localdomain localhost
[tt70s@com ~]$

发现地址不对,修改为:
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.10.128   com.oracle.linux
127.0.0.1               com.oracle.linux com localhost.localdomain localhost
现在,可以ping主机:
[root@com tt70s]# ping com.oracle.linux
PING com.oracle.linux (127.0.0.1) 56(84) bytes of data.
64 bytes from com.oracle.linux (127.0.0.1): icmp_seq=0 ttl=64 time=1.90 ms
64 bytes from com.oracle.linux (127.0.0.1): icmp_seq=1 ttl=64 time=0.638 ms
64 bytes from com.oracle.linux (127.0.0.1): icmp_seq=2 ttl=64 time=0.116 ms
--- com.oracle.linux ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.116/0.885/1.902/0.750 ms, pipe 2
[root@com tt70s]#

然后启动监听:
[oracle@com admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 30-OCT-2008 16:13:42
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
Starting /home/oracle/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /home/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /home/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=com.oracle.linux)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                30-OCT-2008 16:13:43
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /home/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=com.oracle.linux)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@com admin]$
tnsping 可以了:
[tt70s@com ~]$ tnsping orcl
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 30-OCT-2008 16:17:25
Copyright (c) 1997, 2005, Oracle.  All rights reserved.
Used parameter files:
/home/oracle/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = com.oracle.linux)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.oracle.com)))
OK (10 msec)
[tt70s@com ~]$
再次执行,还是报错:
Command> call ttCacheUidPwdSet('cacheadm', 'oracle');
5102: Cannot load backend library 'libttor.so' for Cache Connect.  OS error message 'libttor.so: cannot open shared object file: No such file or directory'.
The command failed.
Command>

于是检查动态库
[tt70s@com ~]$ ls -al $TT_HOME/lib/libtto*
ls: /home/tt70s/TimesTen/tt70s/bin/lib/libtto*: No such file or directory
[tt70s@com ~]$
[tt70s@com ~]$
[tt70s@com ~]$  ls -la $ORACLE_HOME/lib/libclntsh.so
lrwxrwxrwx  1 oracle oinstall 61 Jul 18  2007 /home/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so -> /home/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1
[tt70s@com ~]$

原来没有安装cache connect component
于是添加该组件,方法如下:
[tt70s@com ~]$ ttversion
TimesTen Release 7.0.5.0.0 (32 bit Linux/x86) (tt70s:17000) 2008-04-04T00:09:04Z
  Instance admin: tt70s
  Instance home directory: /home/tt70s/TimesTen/tt70s
  Daemon home directory: /home/tt70s/TimesTen/tt70s/info
  Access control enabled.
[tt70s@com ~]$

[tt70s@com linux86]$ setup.sh
There are 3 TimesTen instances installed locally :
1) ttclient (TimesTen7.0.4.0.0)
2) tt70m (TimesTen7.0.5.0.0)
3) tt70s (TimesTen7.0.5.0.0)
Of the following options :
  [1] Install a new instance
  [2] Upgrade an existing instance
  [3] Display information about an existing instance
  [q] Quit the installation
Which would you like to perform? [ 1 ] 2
Would you like to add Cache Connect to an existing installation? [ no ] yes
NOTE: There is only one instance which can be upgraded.
Instance Name          : tt70s
Product Installed      : TimesTen7.0.5.0.0
Installation Directory : /home/tt70s/TimesTen/tt70s
BitLevel               : 32
Component Installed    : Client/Server and DataManager
Daemon Port            : 17000
Would you like to upgrade this instance? [ yes ]
Extracting Cache Connect to Oracle ...
The following variables have been set in the file :
/home/tt70s/TimesTen/tt70s/bin/ttThunk
ORACLE_HOME=/home/oracle/oracle/product/10.2.0/db_1
LD_LIBRARY_PATH=/home/tt70s/TimesTen/tt70s/lib:/home/oracle/oracle/product/10.2.0/db_1/lib32:/home/oracle/oracle/product/10.2.0/db_1/network/lib32:/home/oracle/oracle/product/10.2.0/db_1/lib:/home/oracle/oracle/product/10.2.0/db_1/network/lib
Would you like to enable the Cache Connect to Oracle Administrator? [ yes ]   这里也可以选择no
What TCP/IP port number would you like Cache Connect to Oracle Administrator to listen on? [ 17004 ]
NOTE: To access the TimesTen Cache Connect to Oracle Administrator
      go to the url: http://localhost:17004/cache
Restarting the daemon ...
TimesTen Daemon stopped.
TimesTen Daemon startup OK.
End of TimesTen installation.
[tt70s@com linux86]$

再次连接就成功了,呵呵:
[tt70s@com ~]$ ttisql "DSN=ttcache;UID=oratt;PWD=timesten;OraclePWD=oracle"
Copyright (c) 1996-2008, Oracle.  All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
All commands must end with a semicolon character.

connect "DSN=ttcache;UID=oratt;PWD=timesten;OraclePWD=oracle";
Connection successful: DSN=ttcache;UID=oratt;DataStore=/home/tt70s/TimesTen/ttcache/ckpt/ckpt;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;OracleId=orcl;Authenticate=0;LogDir=/home/tt70s/TimesTen/ttcache/log;PermSize=32;TempSize=16;TypeMode=0;
(Default setting AutoCommit=1)
Command> call ttCacheUidPwdSet('cacheadm', 'oracle');
Command>
这里实际上也介绍给大家一个碰到类似问题时,troubleshooting的思路,希望可以帮助大家

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/747/viewspace-483432/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/747/viewspace-483432/

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值