ORA-12154: TNS: could not resolve service name(原创)

同事遇到的问题,在其他电脑用PLSQL可以访问数据库,但他本机用PLSQL登陆时ORA-12154: TNS: could not resolve service name错误.我按照习惯查看了tnsnames.ora文件和监听配置文件,没发现问题.然后我详细的问了一下他安装数据库的步骤,然后查看了sqlnet.ora文件,找到了问题根本所在.
他的NAMES.DIRECTORY_PATH= (ONAMES),所以我把的此项修改为NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME, ONAMES)
再连数据库,一切OK!
  最后如果还不能解决问题请参考以下步骤:
  1.Verify that a tnsnames.ora file exists.(See Also: "Localized Configuration File Support" 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.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值