将ASP.NET Web应用程序与两个不同的Oracle客户端连接 [英] Connecting ASP.NET web applications with two different Oracle clients

查看:89
本文介绍了将ASP.NET Web应用程序与两个不同的Oracle客户端连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我工作的地方,我们有一个较旧的数据库,即Oracle 7.3。在使用ASP.NET创建的IIS 7中的Windows 2008 R2服务器上运行了一些Web应用程序,它使用Oracle 8i客户端连接到此数据库。这工作正常,直到我需要创建一个使用ODP.NET ODAC 11g连接到Oracle 10g R2的新Web应用程序(ASP.NET)。新程序正常运行,使用新客户端没有任何问题。问题是现在旧的应用程序将无法正常工作,有时它会间歇性地来回切换使用8i客户端的Web应用程序工作而新的应用程序不工作,反之亦然。



当旧应用程序停止工作时,我得到ORA-12154:TNS:无法解析指定的连接标识符



有没有办法扼要地告诉Oracle客户端使用的Web应用程序?任何帮助将不胜感激。



Ryan

Where I work, we have an older database which is Oracle 7.3. There are some web application running on a Windows 2008 R2 server in IIS 7 created using ASP.NET which connect to this database with the Oracle 8i client. That worked fine until I needed to create a new web application (ASP.NET) which connects to Oracle 10g R2 using the ODP.NET ODAC 11g. The new program worked correctly with no issues using the new client. The problem is now the old applications will not work and some times it is intermittently switching back and forth where the web application using the 8i client work and the new one does not and vice versa.

When the old application stops working I get ORA-12154: TNS:could not resolve the connect identifier specified

Is there a way to implicently tell the web applications which Oracle client to use? Any help would be greatly appreciated.

Ryan

推荐答案

这里的问题是你的路径设置得到了由11g客户端安装改变,现在它首先出现。

更改它以便首先显示8i路径,这应该有助于您的旧程序再次看到它。



对于较新的,我使用DllPath配置选项强制它使用11g客户端:http://docs.oracle.com/html/E10927_01/ featConfig.htm



现在正在运作
The problem here is that your path setting got altered by the 11g client install, and now it''s appearing first.
Changed it so that the 8i paths appear first, and that should help your older program see it again.

For the newer one, I used the DllPath configuration option to force it to use the 11g client: http://docs.oracle.com/html/E10927_01/featConfig.htm

It is now working


这篇关于将ASP.NET Web应用程序与两个不同的Oracle客户端连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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