Win7 64 上出现 ORA-12154 错误
在 Windows 7 64 位上,.NET 应用程序中的此错误有任何解决方案(因为我认为这是主要原因)吗? (带有 EF4 的 ASP.MVC2)
我有:
- Windows 7 64 位
- Oracle Express 10g(我尝试安装 Client 11g,但是在安装过程中我遇到了另一个错误 - Net Configuration Assist~ 错误 - 有关 oraclj11 和 java 的信息)
我还检查并尝试过:
- tnsnames.ora - 一切都很好
- tnsping - 成功
- sqlnet.ora - NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
我想通过 ASP 应用程序与 Oracle DB 连接(如上所述)并且我仍然看到这个错误。 .NET 无法看到 tnsnames.ora 中的别名
Is there any solution for this error on Windows 7 64 bit (because I think it's the main cause) in .NET application? (ASP.MVC2 with EF4)
I've:
- Windows 7 64 bit
- Oracle Express 10g (i've tried to install Client 11g, but then, during installation i got another error - Net Configuration Assist~ Error - something about oraclj11 and java)
I've also checked and tried:
- tnsnames.ora - everything is all right
- tnsping - was successfull
- sqlnet.ora - NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
I'd like to connect with Oracle DB via ASP application (as above) and I still see this error. .NET cannot see alias which is in tnsnames.ora
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
错误: ORC-12154 和 Oracle Provider 与当前操作系统不兼容(povider 32 位、OS 64)
操作系统: Windows 7 64 位、.NET 4.0、Visual Studio 2010 ,通过SSH(putty)进行Tunel
解决方案:
配置 TNSNAMES.ORA 和 SQLNET.ORA
sqlnet.ora 变量:
对我来说至少工作得很好。
Error: ORC-12154 and Oracle Provider not compatible with current OS (povider 32 bit, OS 64)
OS: Windows 7 64-bit, .NET 4.0, Visual Studio 2010, Tunel via SSH (putty)
Solution:
Configure TNSNAMES.ORA and SQLNET.ORA
sqlnet.ora variables :
For me atleast works fine.
问题似乎出在 32 位 Oracle 客户端和长名称文件路径中的“(x86)”。我已经通过在 .bat 文件中使用它来工作了。
启动/B“C:\ Progra〜2 \ Microsoft Visual Studio 10 \ Common7 \ IDE”“C:\ Progra〜2 \ Microsoft Visual Studio 10.0 \ Common7 \ IDE \ devenv.exe”
The problem seems to be with the 32-bit Oracle client and the "(x86)" in the long-name file path. I've got mine to work by using this in a .bat file.
start /B "C:\Progra~2\Microsoft Visual Studio 10\Common7\IDE" "C:\Progra~2\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe"
这里有一个快速简单的解决方案:
https://stackoverflow.com/questions/1567133/very-frustrating-ora- 12154-excpetion-finally-resolved
基本上,TOAD.exe,如果从包含括号的路径运行,例如:
C:\Program Files (x86)\Quest Software\TOAD\Toad.exe
...尝试连接到数据库时会遇到 TNS 错误:
ORA-12154: TNS: 无法解析指定的连接标识符
将整个 Quest Software 文件夹复制到 C:\Program Files 中,然后就可以开始了。
One quick easy solution is here:
https://stackoverflow.com/questions/1567133/very-frustrating-ora-12154-excpetion-finally-resolved
Basically, TOAD.exe, if run from a path containing parentheses, such as:
C:\Program Files (x86)\Quest Software\TOAD\Toad.exe
...will encounter a TNS error when trying to conenct to a database:
ORA-12154: TNS:could not resolve the connect identifier specified
Copy the entire Quest Software folder into C:\Program Files and you should be good to go.