您的位置:首页 > 数据库 > Oracle

win7 64位下安装、使用oracle客户端 TNS:could not resolve the connect identifier specified

2013-02-25 11:41 477 查看
本机上装的是oracle64位的服务端,因为plsql只能用32位的客户端,所以又装了32位的客户端。plsql可以链接到数据库,结果用在asp.net中时出现错误“Thread: ORA-12154: TNS:could not resolve the connect identifier specified”,在百度查了很多,都说要改环境变量,后来改了试试还是不行。google了一下,一个oracle论坛上有个人有个类似的问题,然后有人回复如下:

What version of Windows? Is it 64-bit?

If you've got both 32 and 64 bit Oracle clients installed, make sure both of them have the same tnsnames.ora file. They each need their own copy.

结果才想起来新装的64位客户端没有配置tnsnames.ora 这个文件。复制过去一份就ok了。

原来plsql调用的是32位客户端,而asp.net调用的是64位的,两个客户端都要配置。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐