无法在Win7 64位上连接到Oracle 10g [英] Failed to connect to Oracle 10g on Win7 64bits

查看:110
本文介绍了无法在Win7 64位上连接到Oracle 10g的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在ASP.NET上创建了一个简单的程序,用这个连接字符串连接到oracle 10g:



Hi everybody,

I've created a simple program on ASP.NET to connect to oracle 10g with this connection string:

provider=MSDAORA;data source=ORCL;user id=SCOTT;password=TIGER





它在win7 32bits上成功运行。但是当我将它移动到win7 64位时,它无法连接到oracle。出现以下错误:





It ran successfully on win7 32bits. But when i move it to win7 64bits, it can't connect to oracle. The following error showed up:

ORA-06413: Connection not open.





我的连接代码是:



My connection code is:

OleDbConnection conn = new OleDbConnection(oracleConnStr);
conn.Open();//The error showed up here...





如何解决这个问题?目前,我在Windows 7 64位上使用oracle 10g 32位。我是否需要更换为oracle 11g?





----------------- -------------------------------------------------- ---------------------







我创建了一个窗口表单应用程序,并使用该连接字符串和构建目标是x86并且它成功运行。但是带有目标的ASP.NET项目是x86仍然显示该错误!

推荐答案

之前我遇到过同样的问题,在我的情况下它起作用了将项目构建为32位应用程序而不是64位。来自Oracle的32位OCI dll不喜欢从64位应用程序中解决。您可以在项目的构建设置(目标平台)中更改此项。
I have had the same problem before, In my case it worked to build the project as 32 bits application instead of 64 bits. the 32 bits OCI dll from Oracle does not like to be addressed from a 64-bits app. You can change this in the buildsettings of your project (target platform).


在这里您可以找到已解决的链接



ORA-06413:连接未打开 [< a href =http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/d578dfe3-5bc3-4bce-9b9e-85b2e9d2f5de/\"target =_ blanktitle =New Window> ^ ]



ORA-06413:连接未打开提示 [ ^ ]



Oracle 06413:连接未公开(x64) [ ^ ]



SSIS的Oracle连接 - ORA-06413:连接未打开。 [ ^ ]
Here you go for solved links

ORA-06413: Connection not open[^]

ORA-06413: connection not open tips[^]

Oracle 06413: Connection Not Open (x64)[^]

Oracle Connection from SSIS – ORA-06413: Connection not open.[^]


你检查过ORACLE_HOME和Path变量的环境变量吗?
have you checked the environment variables for ORACLE_HOME and Path variable?


这篇关于无法在Win7 64位上连接到Oracle 10g的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆