Chinaunix首页 | 论坛 | 博客
  • 博客访问: 43163
  • 博文数量: 9
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 100
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-20 17:59
文章分类
文章存档

2011年(1)

2009年(2)

2008年(6)

我的朋友

分类:

2008-07-02 19:35:49

   测试部不断的测试新库,总是拆了装,装了拆的,弄的我的问题也很多,今天碰到最挠头的问题是ora-12154错误。
   出错原因是测试的mm用sqlplus worksheet连接,打了用户名和密码后不能连接,说无法解析连接。
   这个问题我是第一次碰到,无法连接的问题,首先想到看监听,检查了监听,看了tnsname.ora,没问题,测试妹妹也说这个监听一直这么用,都行,就这么不行了。
   开始郁闷,用sqlplus连接,没问题。能连上去,也说明监听没问题。上网查了下,有高人说用工具软件连不上,是sqlnet.ora造成的,于是编辑了下sqlnet.ora.添加上了
NAMES.DIRECTORY_PATH= (HOSTNAME,TNSNAMES,ONAMES,EZCONNRCT)
问题解决。因为不是自己的机器,没有看日志。比较遗憾。
 
综合总结下,从网上查的资料。解决12514错误,应该有三处要注意
1.监听的配备
2.sqlnet.ore的配置
3.环境变量的设置(或者是注册表的设置)
 
附上从别人日记里抄来的错误码。已备用
ORA-12154: TNS:could not resolve service name
Cause: Oracle Net could not locate the net service name specified in the tnsnames.ora configuration file.
Action: Perform these steps:
1.      Verify that a tnsnames.ora file exists.
See Also:
for configuration file location information
2.      Verify that there are not multiple copies of the tnsnames.ora file.
3.      In the tnsnames.ora file, verify that the net service name specified in your connect string is mapped to a connect descriptor.
4.      Verify that there are no duplicate copies of the sqlnet.ora file.
5.      If you are using domain names, verify that your sqlnet.ora file contains a NAMES.DEFAULT_DOMAIN parameter. If this parameter does not exist, you must specify the domain name in your connect string.
6.      If you are not using domain names, and this parameter exists, delete it or disable it by commenting it out.
7.      If you are connecting from a login dialog box, verify that you are not placing an "@" symbol before your connect net service name.
8.      Activate client tracing and repeat the operation.
Cause: Oracle Net could not locate the database service name or net service name specified in the directory server.
Action: Perform these steps:
1.      Verify that the database service or net service name entry exists in the directory that this computer was configured to use.
See Also:
for directory setup instructions
2.      Verify that the sqlnet.ora file includes the following entry: NAMES.DIRECTORY_PATH=(ldap, other_naming_methods)
阅读(2253) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~