Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2154369
  • 博文数量: 157
  • 博客积分: 10047
  • 博客等级: 上将
  • 技术积分: 6757
  • 用 户 组: 普通用户
  • 注册时间: 2005-05-19 11:38
文章分类

全部博文(157)

文章存档

2011年(16)

2010年(50)

2009年(42)

2008年(49)

我的朋友

分类: 数据库开发技术

2008-07-22 14:15:18

作者:
 
环境搭建成功了,现将搭建过程中遇到的错误总结一下,有些错误是Oracle安装遗留的问题,尤其第一个问题,测试机数据库竟然没有设置内存参数,bs一下
 
1、836: Cannot create data store shared-memory segment, error 22
检查/etc/sysctl.conf发现oracle数据库服务器竟然没有配相应的内存参数
[root@CNC-BJ-F-5I2 bin]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
 
2、7001: User authentication failed
[timesten@CNC-BJ-F-5I2 ~]$ ttisql Ttdemo
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=Ttdemo";
 7001: User authentication failed
The command failed.
Done.
[timesten@CNC-BJ-F-5I2 ~]$
正确的方法应该是先在timesten创建一个和oracle完全一样的用户名和密码,
[timesten@CNC-BJ-F-5I2 ~]$ ttisql Ttdemo
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=Ttdemo";
Connection successful: DSN=Ttdemo;UID=timesten;DataStore=/etc/TimesTen/tt70/info/DemoDataStore/Ttdemo;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;DRIVER=/etc/TimesTen/tt70/lib/libtten.so;PermSize=20;TempSize=20;TypeMode=0;
(Default setting AutoCommit=1)
Command> create user logstat identified by 'logstat';
Command> grant ddl,admin to logstat;
Command> exit
Disconnecting...
Done.
 
3、5203: Could not find library /u01/app/oracle/product/10.2.0/db_1/lib/libclntsh.so
原因是timesten用户没有访问 /u01/app/oracle/product/10.2.0/db_1目录的权限
设置权限并重新启动服务
[root@CNC-BJ-F-5I2 bin]# ttdaemonadmin -stop
-bash: ttdaemonadmin: command not found
[root@CNC-BJ-F-5I2 bin]# su - timesten
-bash: /u01/app/oracle/product/10.2.0/db_1/lib/:: No such file or directory
[timesten@CNC-BJ-F-5I2 ~]$ ttdaemonadmin -stop
TimesTen Daemon stopped.
[timesten@CNC-BJ-F-5I2 ~]$ ttstatus
ttStatus: Could not connect to the TimesTen daemon.
If the TimesTen daemon is not running, please start it
by running "ttDaemonAdmin -start".
[timesten@CNC-BJ-F-5I2 ~]$ ttdaemonadmin -start
[timesten@CNC-BJ-F-5I2 ~]$ ttisql Ttdemo
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=Ttdemo";
Connection successful: DSN=Ttdemo;UID=logstat;DataStore=/etc/TimesTen/tt70/info/DemoDataStore/Ttdemo;DatabaseCharacterSet=US7ASCII;ConnectionCharacterSet=US7ASCII;DRIVER=/etc/TimesTen/tt70/lib/libtten.so;OracleId=logstat1;TypeMode=0;
(Default setting AutoCommit=1)
Command>

4、 8296: TimesTen and Oracle database character sets do not match.
Command> call ttcacheuidpwdset('logstat','logstat');
 8296: TimesTen and Oracle database character sets do not match.  TimesTen: US7ASCII, Oracle: ZHS16GBK
 5935: Could not validate Oracle login: uid = logstat, pwd = HIDDEN, oracleId = logstat1
The command failed.
Command>
重新安装,解决该问题
5、5213: Bad Oracle login error in OCISessionBegin(): ORA-01017: invalid username/password; logon denied rc = -1
[tt1@CNC-BJ-F-5I2 ~]$ ttisql ttdemo
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=ttdemo";
Enter password for 'LOGSTAT':
Connection successful: DSN=ttdemo;UID=LOGSTAT;DataStore=/home/tt1/TimesTen/tt70/info/DemoDataStore/ttdemo;DatabaseCharacterSet=ZHS16GBK;ConnectionCharacterSet=ZHS16GBK;DRIVER=/home/tt1/TimesTen/tt70/lib/libtten.so;OracleId=logstat1;PermSize=16;TempSize=16;TypeMode=0;
(Default setting AutoCommit=1)
Command>  create readonly cache group tt_cache autorefresh interval 2 seconds from tt_test(a int primary key);
 5213: Bad Oracle login error in OCISessionBegin(): ORA-01017: invalid username/password; logon denied rc = -1
 5131: Cannot connect to Oracle database: connect_string = "logstat1", uid = "LOGSTAT", pwd is hidden
The command failed.

解决方法如下:添加OraclePWD=logstat,这个是连接oracle所用密码,PWD是连接timesten所用密码
参考:
[ttdemo]
Driver=/home/tt1/TimesTen/tt70/lib/libtten.so
DataStore=/home/tt1/TimesTen/tt70/info/DemoDataStore/ttdemo
DatabaseCharacterSet=ZHS16GBK
ConnectionCharacterSet=ZHS16GBK
#ConnectionCharacterSet=US7ASCII
TempSize=16
PermSize=16
#Authenticate=0
UID=logstat
PWD=logstat
OraclePWD=logstat
OracleId=logstat1
阅读(3727) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~