最近在学习timesten1121,其中有一步是在关联timesten到oracle,我这里的tt和oracle是分别安装在两台机器上的,用的cache administrator用户登录,本例中是cacheadmin
[timesten@vm1 info]$ ttisql
Copyright (c) 1996-2011, Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
Command> connect "dsn=tt_1121;uid=cacheadmin";
Enter password for 'cacheadmin':
Connection successful: DSN=TT_1121;UID=cacheadmin;DataStore=/home/timesten/TimesTen/tt1121/info/TT_1121;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=AL32UTF8;DRIVER=/home/timesten/TimesTen/tt1121/lib/libtten.so;OracleId=db69;PermSize=40;TempSize=32;TypeMode=0;OracleNetServiceName=db69;
(Default setting AutoCommit=1)
Command>
Command>
Command>
Command> call ttcacheuidpwdset('cacheadmin','cacheadmin');
5220: Permanent Oracle connection failure error in OCIServerAttach(): ORA-12154: TNS:could not resolve the connect identifier specified rc = -1
5935: Could not validate Oracle login: uid = CACHEADMIN, pwd = HIDDEN, racleNetServiceName = db69, TNS_ADMIN = "/u01/app/oracle/product/11.2.0/dbhome_1/network/admin", ORACLE_HOME= "/u01/app/oracle/product/11.2.0/dbhome_1"
The command failed.
被这个错误折腾了大半天,查了MOS,查了trouble shooting guide,还有google,发现他们说的这些问题我的都没有,所有设置都正确,那是为什么乜?就在我心灰意冷打算裸体跪地求人的时候,突然想到是不是权限的问题,因为通过TT_HOME下自带的sqlplus连接oracle也不成功。用timesten(tt的OS用户)查看oracle的tnsnames.ora果然没有权限,在我chmod 777 tnsnames.ora后该问题顺利得到解决。
需要说明一下的是,如果tt和oracle用同一个oracle用户,不会存在该问题,我是新创建了timesten用户,加入到dba组里,但tnsnames.ora的属主是oracle:oinstall,所以另外一个解决办法就是把timesten加入到oinstall组里即可。
转: http://blog.itpub.net/7734298/viewspace-711467/
阅读(1338) | 评论(0) | 转发(0) |