昨天遇到了ORA-06413错误!

1.我做项目时用到有一个cs的程序,采用oracle数据库,连接字符串如下:

  Provider=MSDAORA.1;Password=mypassword;User ID=myuser;Data Source=myds

2.应用程序保存在如下目录:

  E:/当前工作(备份)/参考程序

3.该程序是用c#写的一个winform应用,主程序是一个exe文件

 

4.当同事双击exe然后在显示的登录窗口输入用户名和密码,点击确定,出现ORA-06413错误:连接未打开,但sqlplus可以正常连接

5.考虑是Provider的问题(Provider=MSDAORA.1),所以重新安装了MDAC组件,安装完成后测试,问题依旧

6.考虑可能是oracle客户端的问题,重新安装了oracle客户端,问题还是没有解决

7.google一下,找到如下描述:(http://blog.itpub.net/post/952/24354)

 

 Error: ORA 6413 
Text: Connection not open.
------------------------------------------------------------
Cause: Unable to establish connection.
Action: Use diagnostic procedures to ascertain exact problem.


Solution Description
--------------------

You are starting the application from a directory with a special 
character in the name.
A simple testcase:
create a directory c:test(4)
copy odbctst.exe to this directory and start it from this directory
you will get the ora-6413 when trying to connect to an oracle database

The error is caused by the paranthesis in the directory name.

Remove the special characters from the directory name and everything
will work as designed.

8.我把程序从Program Files (x86)剪切到D:根目录D:\PLSQL Developer,运行exe文件,问题得以解决!

你可能感兴趣的:(昨天遇到了ORA-06413错误!)